mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Add unit test message for KeyboardLayoutSetTests
Change-Id: Ia92e4b410ca966d2dc1c5f29a340d366aa066838
This commit is contained in:
parent
e989c6ea85
commit
5c7c538f16
@ -80,12 +80,25 @@ public class KeyboardLayoutSetTestsBase extends AndroidTestCase {
|
|||||||
|| mScreenMetrics == Constants.SCREEN_METRICS_LARGE_PHONE;
|
|| 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() {
|
public final void testAllSubtypesCount() {
|
||||||
assertEquals(NUMBER_OF_SUBTYPES, mAllSubtypesList.size());
|
assertEquals(toString(mAllSubtypesList),
|
||||||
|
NUMBER_OF_SUBTYPES, mAllSubtypesList.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void testAsciiCapableSubtypesCount() {
|
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,
|
protected final InputMethodSubtype getSubtype(final Locale locale,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user