The test was expecting an ArgumentCaptor for RestrictedDropDownPreference (extends ListPreference).setEntryValues(CharSequence[]) to be passed an array of Strings, when actually it should have expected an array of CharSequences. This CL fixes the test to use CharSequence. Since CharSequence.equals() is not guaranteed to be in terms of value equality of the characters, a private static helper method: List<String> toStringList(CharSequence[] charSequences) { ... } is used. Bug: 70504129 Test: EXPERIMENTAL_USE_OPENJDK9=1.8 make -j30 showcommands dist \ RunSettingsRoboTests RunSettingsRoboTests-jacoco \ RunSettingsLibRoboTests RunSettingsLibRoboTests-jacoco \ RunSettingsGoogleRoboTests RunSettingsGoogleRoboTests-jacoco \ RunSuwRoboTests RunSuwRoboTests-jacoco \ RunTurboRoboTests \ RunStorageManagerRoboTests \ RunTvSettingsRoboTests RunTvSettingsRoboTests-jacoco Change-Id: I347b03e6cb01715cd1c7f50b5f36567e5f375ad7
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.