private void assertParser(
     String message,
     String moreKeySpec,
     String expectedLabel,
     String expectedOutputText,
     int expectedIcon,
     int expectedCode) {
   final String labelResolved = KeySpecParser.resolveTextReference(moreKeySpec, mTextsSet);
   final MoreKeySpec spec =
       new MoreKeySpec(labelResolved, false /* needsToUpperCase */, Locale.US, mCodesSet);
   assertEquals(message + " [label]", expectedLabel, spec.mLabel);
   assertEquals(message + " [ouptputText]", expectedOutputText, spec.mOutputText);
   assertEquals(
       message + " [icon]",
       KeyboardIconsSet.getIconName(expectedIcon),
       KeyboardIconsSet.getIconName(spec.mIconId));
   assertEquals(
       message + " [code]",
       Keyboard.printableCode(expectedCode),
       Keyboard.printableCode(spec.mCode));
 }
Пример #2
0
 @Override
 public String toString() {
   return String.format(
       "%s/%s %d,%d %dx%d %s/%s/%s",
       Keyboard.printableCode(mCode),
       mLabel,
       mX,
       mY,
       mWidth,
       mHeight,
       mHintLabel,
       KeyboardIconsSet.getIconName(mIconId),
       backgroundName(mBackgroundType));
 }