MÃ¥rten Kongstad | 9c59c31 | 2023-05-30 11:15:02 +0200 | [diff] [blame^] | 1 | import static com.android.aconfig.test.Flags.disabled_ro; |
| 2 | import static com.android.aconfig.test.Flags.disabled_rw; |
| 3 | import static com.android.aconfig.test.Flags.enabled_ro; |
| 4 | import static com.android.aconfig.test.Flags.enabled_rw; |
| 5 | import static org.junit.Assert.assertFalse; |
| 6 | import static org.junit.Assert.assertTrue; |
| 7 | |
| 8 | import org.junit.Test; |
| 9 | import org.junit.runner.RunWith; |
| 10 | import org.junit.runners.JUnit4; |
| 11 | |
| 12 | @RunWith(JUnit4.class) |
| 13 | public final class AconfigTest { |
| 14 | @Test |
| 15 | public void testDisabledReadOnlyFlag() { |
| 16 | assertFalse(disabled_ro()); |
| 17 | } |
| 18 | |
| 19 | @Test |
| 20 | public void testEnabledReadOnlyFlag() { |
| 21 | // TODO: change to assertTrue(enabled_ro()) when the build supports reading tests/*.values |
| 22 | // (currently all flags are assigned the default READ_ONLY + DISABLED) |
| 23 | assertFalse(enabled_ro()); |
| 24 | } |
| 25 | |
| 26 | @Test |
| 27 | public void testDisabledReadWriteFlag() { |
| 28 | assertFalse(disabled_rw()); |
| 29 | } |
| 30 | |
| 31 | @Test |
| 32 | public void testEnabledReadWriteFlag() { |
| 33 | // TODO: change to assertTrue(enabled_rw()) when the build supports reading tests/*.values |
| 34 | // (currently all flags are assigned the default READ_ONLY + DISABLED) |
| 35 | assertFalse(enabled_rw()); |
| 36 | } |
| 37 | } |