The test was asserting that VISIBILIY_NO_OVERRIDE (an int) is not contained in a List<String> (*), which is (trivially) true but doesn't test what the test intends to test. (*) or a List<CharSequence>, which is similarly wrong / meaningless, prior to the base CL http://ag/3345932 VisibilityPreferenceController uses Integer.toString() to construct corresponding String values, so the test should be checking for that String value. For consistency with testUpdateState_noGlobalRestriction() this CL uses the equivalent (and slightly shorter) String.valueOf(int) instead of Integer.toString(). Test: EXPERIMENTAL_USE_OPENJDK9=1.8 make RunSettingsRoboTests \ ROBOTEST_FILTER=VisibilityPreferenceControllerTest Change-Id: I48644729d3e0f29d7ffcc981aeef650f2b1426ef
Running Settings Robolectric tests
The full suite
$ croot
$ make RunSettingsRoboTests
Running a single test class
$ croot
$ make RunSettingsRoboTests ROBOTEST_FILTER=<ClassName>
For example:
make RunSettingsRoboTests ROBOTEST_FILTER=CodeInspectionTest
You can also use partial class name in ROBOTEST_FILTER. If the partial class name matches multiple file names, all of them will be executed.