TestsTamilLK.java revision c9add10c38aabefe41979ec8b0098f3589df8acd
1/*
2 * Copyright (C) 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.android.inputmethod.keyboard.layout.tests;
18
19import android.test.suitebuilder.annotation.Suppress;
20
21import com.android.inputmethod.keyboard.layout.LayoutBase;
22import com.android.inputmethod.keyboard.layout.Symbols;
23import com.android.inputmethod.keyboard.layout.SymbolsShifted;
24import com.android.inputmethod.keyboard.layout.Tamil;
25import com.android.inputmethod.keyboard.layout.Tamil.TamilCustomizer;
26import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
27
28import java.util.Locale;
29
30/**
31 * ta_LK: Tamil (Sri Lanka)/tamil
32 */
33@Suppress
34public final class TestsTamilLK extends LayoutTestsBase {
35    private static final Locale LOCALE = new Locale("ta", "LK");
36    private static final LayoutBase LAYOUT = new Tamil(new TamilLKCustomizer(LOCALE));
37
38    @Override
39    LayoutBase getLayout() { return LAYOUT; }
40
41    private static class TamilLKCustomizer extends TamilCustomizer {
42        public TamilLKCustomizer(final Locale locale) { super(locale); }
43
44        @Override
45        public ExpectedKey getCurrencyKey() { return CURRENCY_RUPEE; }
46
47        @Override
48        public ExpectedKey[] getOtherCurrencyKeys() {
49            return SymbolsShifted.CURRENCIES_OTHER_GENERIC;
50        }
51
52        // U+0DBB/U+0DD4: "රු" SINHALA LETTER RAYANNA/SINHALA VOWEL SIGN KETTI PAA-PILLA
53        private static final ExpectedKey CURRENCY_RUPEE = key("\u0DBB\u0DD4",
54                Symbols.CURRENCY_GENERIC_MORE_KEYS);
55    }
56}
57