Merge "Add nepali_(romanized|traditional) keyboard layout tests"

main
Tadashi G. Takaoka 2014-03-14 11:05:33 +00:00 committed by Android (Google) Code Review
commit e8dd8b99e6
4 changed files with 506 additions and 0 deletions

View File

@ -0,0 +1,176 @@
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.inputmethod.keyboard.layout;
import com.android.inputmethod.keyboard.KeyboardId;
import com.android.inputmethod.keyboard.layout.Hindi.HindiCustomizer;
import com.android.inputmethod.keyboard.layout.Hindi.HindiSymbols;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
/**
* The nepali_romanized layout
*/
public final class NepaliRomanized extends LayoutBase {
private static final String LAYOUT_NAME = "nepali_romanized";
public NepaliRomanized(final LayoutCustomizer customizer) {
super(customizer, HindiSymbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
public static class NepaliRomanizedCustomizer extends HindiCustomizer {
public NepaliRomanizedCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey getCurrencyKey() { return CURRENCY_NEPALI; }
@Override
public ExpectedKey[] getSpaceKeys(final boolean isPhone) {
return joinKeys(SPACE_KEY, ZWNJ_ZWJ_KEY);
}
// U+0930/U+0941/U+002E "रु." NEPALESE RUPEE SIGN
private static final ExpectedKey CURRENCY_NEPALI = key("\u0930\u0941\u002E",
Symbols.DOLLAR_SIGN, Symbols.CENT_SIGN, Symbols.EURO_SIGN, Symbols.POUND_SIGN,
Symbols.YEN_SIGN, Symbols.PESO_SIGN);
}
@Override
ExpectedKey[][] getCommonAlphabetLayout(boolean isPhone) { return ALPHABET_COMMON; }
@Override
ExpectedKey[][] getCommonAlphabetShiftLayout(boolean isPhone, final int elementId) {
if (elementId == KeyboardId.ELEMENT_ALPHABET_AUTOMATIC_SHIFTED) {
return getCommonAlphabetLayout(isPhone);
}
return ALPHABET_SHIFTED_COMMON;
}
private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder()
.setKeysOfRow(1,
// U+091F: "ट" DEVANAGARI LETTER TTA
// U+0967: "१" DEVANAGARI DIGIT ONE
// U+093C: "़" DEVANAGARI SIGN NUKTA
key("\u091F", joinMoreKeys("\u0967", "1", "\u093C")),
// U+094C: "ौ" DEVANAGARI VOWEL SIGN AU
// U+0968: "२" DEVANAGARI DIGIT TWO
key("\u094C", joinMoreKeys("\u0968", "2")),
// U+0947: "े" DEVANAGARI VOWEL SIGN E
// U+0969: "३" DEVANAGARI DIGIT THREE
key("\u0947", joinMoreKeys("\u0969", "3")),
// U+0930: "र" DEVANAGARI LETTER RA
// U+096A: "४" DEVANAGARI DIGIT FOUR
key("\u0930", joinMoreKeys("\u096A", "4")),
// U+0924: "त" DEVANAGARI LETTER TA
// U+096B: "५" DEVANAGARI DIGIT FIVE
key("\u0924", joinMoreKeys("\u096B", "5")),
// U+092F: "य" DEVANAGARI LETTER YA
// U+096C: "६" DEVANAGARI DIGIT SIX
key("\u092F", joinMoreKeys("\u096C", "6")),
// U+0941: "ु" DEVANAGARI VOWEL SIGN U
// U+096D: "७" DEVANAGARI DIGIT SEVEN
key("\u0941", joinMoreKeys("\u096D", "7")),
// U+093F: "ि" DEVANAGARI VOWEL SIGN I
// U+096E: "८" DEVANAGARI DIGIT EIGHT
key("\u093F", joinMoreKeys("\u096E", "8")),
// U+094B: "ो" DEVANAGARI VOWEL SIGN O
// U+096F: "९" DEVANAGARI DIGIT NINE
key("\u094B", joinMoreKeys("\u096F", "9")),
// U+092A: "प" DEVANAGARI LETTER PA
// U+0966: "" DEVANAGARI DIGIT ZERO
key("\u092A", joinMoreKeys("\u0966", "0")),
// U+0907: "इ" DEVANAGARI LETTER I
key("\u0907"))
// U+093E: "ा" DEVANAGARI VOWEL SIGN AA
// U+0938: "स" DEVANAGARI LETTER SA
// U+0926: "द" DEVANAGARI LETTER DA
// U+0909: "उ" DEVANAGARI LETTER U
// U+0917: "ग" DEVANAGARI LETTER GA
// U+0939: "ह" DEVANAGARI LETTER HA
// U+091C: "ज" DEVANAGARI LETTER JA
// U+0915: "क" DEVANAGARI LETTER KA
// U+0932: "ल" DEVANAGARI LETTER LA
// U+090F: "ए" DEVANAGARI LETTER E
// U+0950: "ॐ" DEVANAGARI OM
.setLabelsOfRow(2,
"\u093E", "\u0938", "\u0926", "\u0909", "\u0917", "\u0939", "\u091C", "\u0915",
"\u0932", "\u090F", "\u0950")
// U+0937: "ष" DEVANAGARI LETTER SSA
// U+0921: "ड" DEVANAGARI LETTER DDA
// U+091A: "च" DEVANAGARI LETTER CA
// U+0935: "व" DEVANAGARI LETTER VA
// U+092C: "ब" DEVANAGARI LETTER BHA
// U+0928: "न" DEVANAGARI LETTER NA
// U+092E: "म" DEVANAGARI LETTER MA
// U+0964: "।" DEVANAGARI DANDA
// U+094D: "्" DEVANAGARI SIGN VIRAMA
.setLabelsOfRow(3,
"\u0937", "\u0921", "\u091A", "\u0935", "\u092C", "\u0928", "\u092E", "\u0964",
"\u094D")
// U+0964: "।" DEVANAGARI DANDA
// U+093D: "ऽ" DEVANAGARI SIGN AVAGRAHA
.setMoreKeysOf("\u0964", "\u093D")
.build();
private static final ExpectedKey[][] ALPHABET_SHIFTED_COMMON = new ExpectedKeyboardBuilder()
// U+0920: "ठ" DEVANAGARI LETTER TTHA
// U+0914: "औ" DEVANAGARI LETTER AU
// U+0948: "ै" DEVANAGARI VOWEL SIGN AI
// U+0943: "ृ" DEVANAGARI VOWEL SIGN VOCALIC R
// U+0925: "थ" DEVANAGARI LETTER THA
// U+091E: "ञ" DEVANAGARI LETTER NYA
// U+0942: "ू" DEVANAGARI VOWEL SIGN UU
// U+0940: "ी" DEVANAGARI VOWEL SIGN II
// U+0913: "ओ" DEVANAGARI LETTER O
// U+092B: "फ" DEVANAGARI LETTER PHA
// U+0908: "ई" DEVANAGARI LETTER II
.setLabelsOfRow(1,
"\u0920", "\u0914", "\u0948", "\u0943", "\u0925", "\u091E", "\u0942", "\u0940",
"\u0913", "\u092B", "\u0908")
// U+0906: "आ" DEVANAGARI LETTER AA
// U+0936: "श" DEVANAGARI LETTER SHA
// U+0927: "ध" DEVANAGARI LETTER DHA
// U+090A: "ऊ" DEVANAGARI LETTER UU
// U+0918: "घ" DEVANAGARI LETTER GHA
// U+0905: "अ" DEVANAGARI LETTER A
// U+091D: "झ" DEVANAGARI LETTER JHA
// U+0916: "ख" DEVANAGARI LETTER KHA
// U+0965: "॥" DEVANAGARI DOUBLE DANDA
// U+0910: "ऐ" DEVANAGARI LETTER AI
// U+0903: "" DEVANAGARI SIGN VISARGA
.setLabelsOfRow(2,
"\u0906", "\u0936", "\u0927", "\u090A", "\u0918", "\u0905", "\u091D", "\u0916",
"\u0965", "\u0910", "\u0903")
// U+090B: "ऋ" DEVANAGARI LETTER VOCALIC R
// U+0922: "ढ" DEVANAGARI LETTER DDHA
// U+091B: "छ" DEVANAGARI LETTER CHA
// U+0901: "ँ" DEVANAGARI SIGN CANDRABINDU
// U+092D: "भ" DEVANAGARI LETTER BHA
// U+0923: "ण" DEVANAGARI LETTER NNA
// U+0902: "ं" DEVANAGARI SIGN ANUSVARA
// U+0919: "ङ" DEVANAGARI LETTER NGA
// U+094D: "्" DEVANAGARI SIGN VIRAMA
.setLabelsOfRow(3,
"\u090B", "\u0922", "\u091B", "\u0901", "\u092D", "\u0923", "\u0902", "\u0919",
"\u094D")
.build();
}

View File

@ -0,0 +1,254 @@
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.inputmethod.keyboard.layout;
import com.android.inputmethod.keyboard.KeyboardId;
import com.android.inputmethod.keyboard.layout.Hindi.HindiSymbols;
import com.android.inputmethod.keyboard.layout.NepaliRomanized.NepaliRomanizedCustomizer;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
import java.util.Locale;
/**
* The nepali_traditional keyboard.
*/
public final class NepaliTraditional extends LayoutBase {
private static final String LAYOUT_NAME = "nepali_traditional";
public NepaliTraditional(final LayoutCustomizer customizer) {
super(customizer, HindiSymbols.class, SymbolsShifted.class);
}
@Override
public String getName() { return LAYOUT_NAME; }
public static class NepaliTraditionalCustomizer extends NepaliRomanizedCustomizer {
public NepaliTraditionalCustomizer(final Locale locale) { super(locale); }
@Override
public ExpectedKey[] getRightShiftKeys(final boolean isPhone) { return EMPTY_KEYS; }
@Override
public ExpectedKey[] getKeysRightToSpacebar(final boolean isPhone) {
if (isPhone) {
// U+094D: "्" DEVANAGARI SIGN VIRAMA
return joinKeys(key("\u094D", PHONE_PUNCTUATION_MORE_KEYS));
}
return super.getKeysRightToSpacebar(isPhone);
}
}
@Override
ExpectedKey[][] getCommonAlphabetLayout(boolean isPhone) {
final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(ALPHABET_COMMON);
if (isPhone) {
builder.addKeysOnTheRightOfRow(3,
// U+0947: "े" DEVANAGARI VOWEL SIGN E
// U+0903: "" DEVANAGARI SIGN VISARGA
// U+093D: "ऽ" DEVANAGARI SIGN AVAGRAHA
key("\u0947", joinMoreKeys("\u0903", "\u093D")),
// U+0964: "।" DEVANAGARI DANDA
key("\u0964"),
// U+0930: "र" DEVANAGARI LETTER RA
// U+0930/U+0941: "रु" DEVANAGARI LETTER RA/DEVANAGARI VOWEL SIGN U
key("\u0930", moreKey("\u0930\u0941")));
} else {
builder.addKeysOnTheRightOfRow(3,
// U+0903: "" DEVANAGARI SIGN VISARGA
// U+093D: "ऽ" DEVANAGARI SIGN AVAGRAHA
key("\u0903", moreKey("\u093D")),
// U+0947: "े" DEVANAGARI VOWEL SIGN E
key("\u0947"),
// U+0964: "।" DEVANAGARI DANDA
key("\u0964"),
// U+0930: "र" DEVANAGARI LETTER RA
key("\u0930", moreKey("!")),
// U+094D: "्" DEVANAGARI SIGN VIRAMA
key("\u094D", moreKey("?")));
}
return builder.build();
}
@Override
ExpectedKey[][] getCommonAlphabetShiftLayout(boolean isPhone, final int elementId) {
if (elementId == KeyboardId.ELEMENT_ALPHABET_AUTOMATIC_SHIFTED) {
return getCommonAlphabetLayout(isPhone);
}
final ExpectedKeyboardBuilder builder = new ExpectedKeyboardBuilder(
ALPHABET_SHIFTED_COMMON);
if (isPhone) {
builder.addKeysOnTheRightOfRow(3,
// U+0902: "ं" DEVANAGARI SIGN ANUSVARA
key("\u0902"),
// U+0919: "ङ" DEVANAGARI LETTER NGA
key("\u0919"),
// U+0948: "ै" DEVANAGARI VOWEL SIGN AI
// U+0936/U+094D/U+0930:
// "श्र" DEVANAGARI LETTER SHA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER RA
key("\u0948", moreKey("\u0936\u094D\u0930")));
} else {
builder.addKeysOnTheRightOfRow(3,
// U+0902: "ं" DEVANAGARI SIGN ANUSVARA
key("\u0902"),
// U+0919: "ङ" DEVANAGARI LETTER NGA
key("\u0919"),
// U+0948: "ै" DEVANAGARI VOWEL SIGN AI
// U+0936/U+094D/U+0930:
// "श्र" DEVANAGARI LETTER SHA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER RA
key("\u0948", moreKey("\u0936\u094D\u0930")),
// U+0930/U+0941: "रु" DEVANAGARI LETTER RA/DEVANAGARI VOWEL SIGN U
key("\u0930\u0941", moreKey("!")),
key("?"));
}
return builder.build();
}
private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder()
.setKeysOfRow(1,
// U+091F: "ट" DEVANAGARI LETTER TTA
// U+0967: "१" DEVANAGARI DIGIT ONE
key("\u091F", joinMoreKeys("\u0967", "1")),
// U+0927: "ध" DEVANAGARI LETTER DHA
// U+0968: "२" DEVANAGARI DIGIT TWO
key("\u0927", joinMoreKeys("\u0968", "2")),
// U+092D: "भ" DEVANAGARI LETTER BHA
// U+0969: "३" DEVANAGARI DIGIT THREE
key("\u092D", joinMoreKeys("\u0969", "3")),
// U+091A: "च" DEVANAGARI LETTER CA
// U+096A: "४" DEVANAGARI DIGIT FOUR
key("\u091A", joinMoreKeys("\u096A", "4")),
// U+0924: "त" DEVANAGARI LETTER TA
// U+096B: "५" DEVANAGARI DIGIT FIVE
key("\u0924", joinMoreKeys("\u096B", "5")),
// U+0925: "थ" DEVANAGARI LETTER THA
// U+096C: "६" DEVANAGARI DIGIT SIX
key("\u0925", joinMoreKeys("\u096C", "6")),
// U+0917: "ग" DEVANAGARI LETTER G
// U+096D: "७" DEVANAGARI DIGIT SEVEN
key("\u0917", joinMoreKeys("\u096D", "7")),
// U+0937: "ष" DEVANAGARI LETTER SSA
// U+096E: "८" DEVANAGARI DIGIT EIGHT
key("\u0937", joinMoreKeys("\u096E", "8")),
// U+092F: "य" DEVANAGARI LETTER YA
// U+096F: "९" DEVANAGARI DIGIT NINE
key("\u092F", joinMoreKeys("\u096F", "9")),
// U+0909: "उ" DEVANAGARI LETTER U
// U+0966: "" DEVANAGARI DIGIT ZERO
key("\u0909", joinMoreKeys("\u0966", "0")),
// U+0907: "इ" DEVANAGARI LETTER I
// U+0914: "औ" DEVANAGARI LETTER AU
key("\u0907", moreKey("\u0914")))
// U+092C: "ब" DEVANAGARI LETTER BA
// U+0915: "क" DEVANAGARI LETTER KA
// U+092E: "म" DEVANAGARI LETTER MA
// U+093E: "ा" DEVANAGARI VOWEL SIGN AA
// U+0928: "न" DEVANAGARI LETTER NA
// U+091C: "ज" DEVANAGARI LETTER JA
// U+0935: "व" DEVANAGARI LETTER VA
// U+092A: "प" DEVANAGARI LETTER PA
// U+093F: "ि" DEVANAGARI VOWEL SIGN I
// U+0938: "स" DEVANAGARI LETTER SA
// U+0941: "ु" DEVANAGARI VOWEL SIGN U
.setLabelsOfRow(2,
"\u092C", "\u0915", "\u092E", "\u093E", "\u0928", "\u091C", "\u0935", "\u092A",
"\u093F", "\u0938", "\u0941")
// U+0936: "श" DEVANAGARI LETTER SHA
// U+0939: "ह" DEVANAGARI LETTER HA
// U+0905: "अ" DEVANAGARI LETTER A
// U+0916: "ख" DEVANAGARI LETTER KHA
// U+0926: "द" DEVANAGARI LETTER DA
// U+0932: "ल" DEVANAGARI LETTER LA
.setLabelsOfRow(3, "\u0936", "\u0939", "\u0905", "\u0916", "\u0926", "\u0932")
.build();
private static final ExpectedKey[][] ALPHABET_SHIFTED_COMMON = new ExpectedKeyboardBuilder()
.setKeysOfRow(1,
// U+0924/U+094D/U+0924:
// "त्त" DEVANAGARI LETTER TA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER TA
// U+091E: "ञ" DEVANAGARI LETTER NYA
// U+091C/U+094D/U+091E: "ज्ञ" DEVANAGARI LETTER JA/DEVANAGARI SIGN
// VIRAMA/DEVANAGARI LETTER NYA
// U+0965: "॥" DEVANAGARI DOUBLE DANDA
key("\u0924\u094D\u0924",
joinMoreKeys("\u091E", "\u091C\u094D\u091E", "\u0965")),
// U+0921/U+094D/U+0922:
// "ड्ढ" DEVANAGARI LETTER DDA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER DDHA
// U+0908: "ई" DEVANAGARI LETTER II
key("\u0921\u094D\u0922", moreKey("\u0908")),
// U+0910: "ऐ" DEVANAGARI LETTER AI
// U+0918: "घ" DEVANAGARI LETTER GHA
key("\u0910", moreKey("\u0918")),
// U+0926/U+094D/U+0935:
// "द्व" DEVANAGARI LETTER DA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER VA
// U+0926/U+094D/U+0927:
// "द्ध" DEVANAGARI LETTER DA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER DHA
key("\u0926\u094D\u0935", moreKey("\u0926\u094D\u0927")),
// U+091F/U+094D/U+091F:
// "ट्ट" DEVANAGARI LETTER TTA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER TTA
// U+091B: "छ" DEVANAGARI LETTER CHA
key("\u091F\u094D\u091F", moreKey("\u091B")),
// U+0920/U+094D/U+0920:
// "ठ्ठ" DEVANAGARI LETTER TTHA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER TTHA
// U+091F: "ट" DEVANAGARI LETTER TTA
key("\u0920\u094D\u0920", moreKey("\u091F")),
// U+090A: "ऊ" DEVANAGARI LETTER UU
// U+0920: "ठ" DEVANAGARI LETTER TTHA
key("\u090A", moreKey("\u0920")),
// U+0915/U+094D/U+0937:
// "क्ष" DEVANAGARI LETTER KA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER SSA
// U+0921: "ड" DEVANAGARI LETTER DDA
key("\u0915\u094D\u0937", moreKey("\u0921")),
// U+0907: "इ" DEVANAGARI LETTER I
// U+0922: "ढ" DEVANAGARI LETTER DDHA
key("\u0907", moreKey("\u0922")),
// U+090F: "ए" DEVANAGARI LETTER E
// U+0923: "ण" DEVANAGARI LETTER NNA
key("\u090F", moreKey("\u0923")),
// U+0943: "ृ" DEVANAGARI VOWEL SIGN VOCALIC R
// U+0913: "ओ" DEVANAGARI LETTER O
key("\u0943", moreKey("\u0913")))
// U+0906: "आ" DEVANAGARI LETTER AA
// U+0919/U+094D: "ङ्" DEVANAGARI LETTER NGA/DEVANAGARI SIGN VIRAMA
// U+0921/U+094D/U+0921:
// "ड्ड" DEVANAGARI LETTER DDA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER DDA
// U+0901: "ँ" DEVANAGARI SIGN CANDRABINDU
// U+0926/U+094D/U+0926:
// "द्द" DEVANAGARI LETTER DA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER DA
// U+091D: "झ" DEVANAGARI LETTER JHA
// U+094B: "ो" DEVANAGARI VOWEL SIGN O
// U+092B: "फ" DEVANAGARI LETTER PHA
// U+0940: "ी" DEVANAGARI VOWEL SIGN II
// U+091F/U+094D/U+0920:
// "ट्ठ" DEVANAGARI LETTER TTA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER TTHA
// U+0942: "ू" DEVANAGARI VOWEL SIGN UU
.setLabelsOfRow(2,
"\u0906", "\u0919\u094D", "\u0921\u094D\u0921", "\u0901", "\u0926\u094D\u0926",
"\u091D", "\u094B", "\u092B", "\u0940", "\u091F\u094D\u0920", "\u0942")
// U+0915/U+094D: "क्" DEVANAGARI LETTER KA/DEVANAGARI SIGN VIRAMA
// U+0939/U+094D/U+092E:
// "ह्म" DEVANAGARI LETTER HA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER MA
// U+090B: "ऋ" DEVANAGARI LETTER VOCALIC R
// U+0950: "ॐ" DEVANAGARI OM
// U+094C: "ौ" DEVANAGARI VOWEL SIGN AU
// U+0926/U+094D/U+092F:
// "द्य" DEVANAGARI LETTER DA/DEVANAGARI SIGN VIRAMA/DEVANAGARI LETTER YA
.setLabelsOfRow(3,
"\u0915\u094D", "\u0939\u094D\u092E", "\u090B", "\u0950", "\u094C",
"\u0926\u094D\u092F")
.build();
}

View File

@ -0,0 +1,38 @@
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.NepaliRomanized;
import com.android.inputmethod.keyboard.layout.NepaliRomanized.NepaliRomanizedCustomizer;
import java.util.Locale;
/**
* ne_NP: Nepali (Nepal) Romanized/nepali_romanized
*/
@SmallTest
public final class TestsNepaliRomanized extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("ne", "NP");
private static final LayoutBase LAYOUT = new NepaliRomanized(
new NepaliRomanizedCustomizer(LOCALE));
@Override
LayoutBase getLayout() { return LAYOUT; }
}

View File

@ -0,0 +1,38 @@
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.inputmethod.keyboard.layout.tests;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.inputmethod.keyboard.layout.LayoutBase;
import com.android.inputmethod.keyboard.layout.NepaliTraditional;
import com.android.inputmethod.keyboard.layout.NepaliTraditional.NepaliTraditionalCustomizer;
import java.util.Locale;
/**
* ne_NP: Nepali (Nepal) Traditional/nepali_traditional
*/
@SmallTest
public final class TestsNepaliTraditional extends LayoutTestsBase {
private static final Locale LOCALE = new Locale("ne", "NP");
private static final LayoutBase LAYOUT = new NepaliTraditional(
new NepaliTraditionalCustomizer(LOCALE));
@Override
LayoutBase getLayout() { return LAYOUT; }
}