Rename base test class KeySpecParserTestsBase
Change-Id: I41e1ccb3f0cfde4e5ae311a763e5659e5ff71d3cmain
parent
aac53dd7f5
commit
2151216c09
|
@ -21,7 +21,7 @@ import android.test.suitebuilder.annotation.SmallTest;
|
||||||
import com.android.inputmethod.latin.Constants;
|
import com.android.inputmethod.latin.Constants;
|
||||||
|
|
||||||
@SmallTest
|
@SmallTest
|
||||||
public final class KeySpecParserTests extends KeySpecParserBase {
|
public final class KeySpecParserTests extends KeySpecParserTestsBase {
|
||||||
@Override
|
@Override
|
||||||
protected void assertParser(final String message, final String keySpec,
|
protected void assertParser(final String message, final String keySpec,
|
||||||
final String expectedLabel, final String expectedOutputText, final int expectedIcon,
|
final String expectedLabel, final String expectedOutputText, final int expectedIcon,
|
||||||
|
|
|
@ -30,7 +30,7 @@ import com.android.inputmethod.latin.utils.RunInLocale;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
abstract class KeySpecParserBase extends AndroidTestCase {
|
abstract class KeySpecParserTestsBase extends AndroidTestCase {
|
||||||
private final static Locale TEST_LOCALE = Locale.ENGLISH;
|
private final static Locale TEST_LOCALE = Locale.ENGLISH;
|
||||||
protected final KeyboardCodesSet mCodesSet = new KeyboardCodesSet();
|
protected final KeyboardCodesSet mCodesSet = new KeyboardCodesSet();
|
||||||
protected final KeyboardTextsSet mTextsSet = new KeyboardTextsSet();
|
protected final KeyboardTextsSet mTextsSet = new KeyboardTextsSet();
|
||||||
|
@ -251,8 +251,12 @@ abstract class KeySpecParserBase extends AndroidTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testFormatError() {
|
public void testFormatError() {
|
||||||
|
assertParserError("Null spec", null, null,
|
||||||
|
null, ICON_UNDEFINED, CODE_UNSPECIFIED);
|
||||||
assertParserError("Empty spec", "", null,
|
assertParserError("Empty spec", "", null,
|
||||||
null, ICON_UNDEFINED, CODE_UNSPECIFIED);
|
null, ICON_UNDEFINED, CODE_UNSPECIFIED);
|
||||||
|
assertParserError("Single bar", "|",
|
||||||
|
"|", null, ICON_UNDEFINED, '|');
|
||||||
assertParserError("Empty label with outputText", "|a",
|
assertParserError("Empty label with outputText", "|a",
|
||||||
null, "a", ICON_UNDEFINED, CODE_UNSPECIFIED);
|
null, "a", ICON_UNDEFINED, CODE_UNSPECIFIED);
|
||||||
assertParserError("Empty label with code", "|" + CODE_SETTINGS,
|
assertParserError("Empty label with code", "|" + CODE_SETTINGS,
|
|
@ -24,7 +24,7 @@ import java.util.Arrays;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
@SmallTest
|
@SmallTest
|
||||||
public final class MoreKeySpecTests extends KeySpecParserBase {
|
public final class MoreKeySpecTests extends KeySpecParserTestsBase {
|
||||||
@Override
|
@Override
|
||||||
protected void assertParser(final String message, final String moreKeySpec,
|
protected void assertParser(final String message, final String moreKeySpec,
|
||||||
final String expectedLabel, final String expectedOutputText, final int expectedIconId,
|
final String expectedLabel, final String expectedOutputText, final int expectedIconId,
|
||||||
|
|
Loading…
Reference in New Issue