diff --git a/tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserTests.java b/tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserTests.java index e29181c71..9b6c46200 100644 --- a/tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserTests.java +++ b/tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserTests.java @@ -21,7 +21,7 @@ import android.test.suitebuilder.annotation.SmallTest; import com.android.inputmethod.latin.Constants; @SmallTest -public final class KeySpecParserTests extends KeySpecParserBase { +public final class KeySpecParserTests extends KeySpecParserTestsBase { @Override protected void assertParser(final String message, final String keySpec, final String expectedLabel, final String expectedOutputText, final int expectedIcon, diff --git a/tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserBase.java b/tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserTestsBase.java similarity index 98% rename from tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserBase.java rename to tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserTestsBase.java index aecef23e8..04b7008ef 100644 --- a/tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserBase.java +++ b/tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserTestsBase.java @@ -30,7 +30,7 @@ import com.android.inputmethod.latin.utils.RunInLocale; import java.util.Locale; -abstract class KeySpecParserBase extends AndroidTestCase { +abstract class KeySpecParserTestsBase extends AndroidTestCase { private final static Locale TEST_LOCALE = Locale.ENGLISH; protected final KeyboardCodesSet mCodesSet = new KeyboardCodesSet(); protected final KeyboardTextsSet mTextsSet = new KeyboardTextsSet(); @@ -251,8 +251,12 @@ abstract class KeySpecParserBase extends AndroidTestCase { } public void testFormatError() { + assertParserError("Null spec", null, null, + null, ICON_UNDEFINED, CODE_UNSPECIFIED); assertParserError("Empty spec", "", null, null, ICON_UNDEFINED, CODE_UNSPECIFIED); + assertParserError("Single bar", "|", + "|", null, ICON_UNDEFINED, '|'); assertParserError("Empty label with outputText", "|a", null, "a", ICON_UNDEFINED, CODE_UNSPECIFIED); assertParserError("Empty label with code", "|" + CODE_SETTINGS, diff --git a/tests/src/com/android/inputmethod/keyboard/internal/MoreKeySpecTests.java b/tests/src/com/android/inputmethod/keyboard/internal/MoreKeySpecTests.java index 213e2d483..e49c62461 100644 --- a/tests/src/com/android/inputmethod/keyboard/internal/MoreKeySpecTests.java +++ b/tests/src/com/android/inputmethod/keyboard/internal/MoreKeySpecTests.java @@ -24,7 +24,7 @@ import java.util.Arrays; import java.util.Locale; @SmallTest -public final class MoreKeySpecTests extends KeySpecParserBase { +public final class MoreKeySpecTests extends KeySpecParserTestsBase { @Override protected void assertParser(final String message, final String moreKeySpec, final String expectedLabel, final String expectedOutputText, final int expectedIconId,