1240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka/* 2240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka * Copyright (C) 2014 The Android Open Source Project 3240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka * 4240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka * Licensed under the Apache License, Version 2.0 (the "License"); 5240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka * you may not use this file except in compliance with the License. 6240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka * You may obtain a copy of the License at 7240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka * 8240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka * http://www.apache.org/licenses/LICENSE-2.0 9240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka * 10240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka * Unless required by applicable law or agreed to in writing, software 11240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka * distributed under the License is distributed on an "AS IS" BASIS, 12240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka * See the License for the specific language governing permissions and 14240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka * limitations under the License. 15240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka */ 16240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka 17240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaokapackage com.android.inputmethod.keyboard.layout.tests; 18240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka 19240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaokaimport android.test.suitebuilder.annotation.SmallTest; 20240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka 21240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaokaimport com.android.inputmethod.keyboard.layout.EastSlavic; 22240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaokaimport com.android.inputmethod.keyboard.layout.LayoutBase; 23240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaokaimport com.android.inputmethod.keyboard.layout.Symbols; 246959a0f214fc18e314f54213877956d95a1631e8Tadashi G. Takaokaimport com.android.inputmethod.keyboard.layout.customizer.EastSlavicCustomizer; 25240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaokaimport com.android.inputmethod.keyboard.layout.expected.ExpectedKey; 26240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaokaimport com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; 27240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka 28240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaokaimport java.util.Locale; 29240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka 30240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka/** 31240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka * be_BY: Belarusian (Belarus)/east_slavic 32240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka */ 33240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka@SmallTest 34240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaokapublic final class TestsBelarusianBY extends LayoutTestsBase { 35240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka private static final Locale LOCALE = new Locale("be", "BY"); 36240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka private static final LayoutBase LAYOUT = new EastSlavic(new BelarusianBYCustomizer(LOCALE)); 37240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka 38240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka @Override 39240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka LayoutBase getLayout() { return LAYOUT; } 40240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka 41240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka private static class BelarusianBYCustomizer extends EastSlavicCustomizer { 426959a0f214fc18e314f54213877956d95a1631e8Tadashi G. Takaoka BelarusianBYCustomizer(final Locale locale) { super(locale); } 43240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka 44240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka @Override 45240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka public ExpectedKey[] getDoubleQuoteMoreKeys() { 46240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka return Symbols.DOUBLE_QUOTES_R9L; 47240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka } 48240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka 49240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka @Override 50240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka public ExpectedKey[] getSingleQuoteMoreKeys() { 51240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka return Symbols.SINGLE_QUOTES_R9L; 52240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka } 53240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka 54240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka @Override 55240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka public ExpectedKeyboardBuilder setAccentedLetters(final ExpectedKeyboardBuilder builder) { 56240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka return builder 57240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka // U+0435: "е" CYRILLIC SMALL LETTER IE 58240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka // U+0451: "ё" CYRILLIC SMALL LETTER IO 590dabae720a83f9099667dea4de002007fdf35d60Tadashi G. Takaoka .setMoreKeysOf("\u0435", "\u0451") 60240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka // U+045E: "ў" CYRILLIC SMALL LETTER SHORT U 610dabae720a83f9099667dea4de002007fdf35d60Tadashi G. Takaoka .replaceKeyOfLabel(EastSlavic.ROW1_9, key("\u045E", additionalMoreKey("9"))) 62240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka // U+044B: "ы" CYRILLIC SMALL LETTER YERU 630dabae720a83f9099667dea4de002007fdf35d60Tadashi G. Takaoka .replaceKeyOfLabel(EastSlavic.ROW2_2, "\u044B") 64240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka // U+044D: "э" CYRILLIC SMALL LETTER E 650dabae720a83f9099667dea4de002007fdf35d60Tadashi G. Takaoka .replaceKeyOfLabel(EastSlavic.ROW2_11, "\u044D") 66240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka // U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I 670dabae720a83f9099667dea4de002007fdf35d60Tadashi G. Takaoka .replaceKeyOfLabel(EastSlavic.ROW3_5, "\u0456") 68240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka // U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN 69240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka // U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN 70240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka .setMoreKeysOf("\u044C", "\u044A"); 71240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka } 72240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka } 73240fb4b3ffeb609545720cc71251425868118a79Tadashi G. Takaoka} 74