Add unit test message for KeyboardLayoutSetTests
Change-Id: Ia92e4b410ca966d2dc1c5f29a340d366aa066838
This commit is contained in:
parent
e989c6ea85
commit
5c7c538f16
1 changed files with 15 additions and 2 deletions
|
@ -80,12 +80,25 @@ public class KeyboardLayoutSetTestsBase extends AndroidTestCase {
|
|||
|| mScreenMetrics == Constants.SCREEN_METRICS_LARGE_PHONE;
|
||||
}
|
||||
|
||||
private static String toString(final ArrayList<InputMethodSubtype> subtypeList) {
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
for (int index = 0; index < subtypeList.size(); index++) {
|
||||
final InputMethodSubtype subtype = subtypeList.get(index);
|
||||
sb.append((index + 1) + ": ");
|
||||
sb.append(SubtypeLocaleUtils.getSubtypeNameForLogging(subtype));
|
||||
sb.append("\n");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public final void testAllSubtypesCount() {
|
||||
assertEquals(NUMBER_OF_SUBTYPES, mAllSubtypesList.size());
|
||||
assertEquals(toString(mAllSubtypesList),
|
||||
NUMBER_OF_SUBTYPES, mAllSubtypesList.size());
|
||||
}
|
||||
|
||||
public final void testAsciiCapableSubtypesCount() {
|
||||
assertEquals(NUMBER_OF_ASCII_CAPABLE_SUBTYPES, mAsciiCapableSubtypesList.size());
|
||||
assertEquals(toString(mAsciiCapableSubtypesList),
|
||||
NUMBER_OF_ASCII_CAPABLE_SUBTYPES, mAsciiCapableSubtypesList.size());
|
||||
}
|
||||
|
||||
protected final InputMethodSubtype getSubtype(final Locale locale,
|
||||
|
|
Loading…
Reference in a new issue