Home | History | Annotate | Download | only in keyboard
      1 /*
      2  * Copyright (C) 2012 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 
     17 package com.android.inputmethod.keyboard;
     18 
     19 import android.test.AndroidTestCase;
     20 import android.test.suitebuilder.annotation.MediumTest;
     21 
     22 import com.android.inputmethod.keyboard.MoreKeysKeyboard.MoreKeysKeyboardParams;
     23 
     24 @MediumTest
     25 public class MoreKeysKeyboardBuilderFixedOrderTests extends AndroidTestCase {
     26     private static final int WIDTH = 10;
     27     private static final int HEIGHT = 10;
     28 
     29     private static final int KEYBOARD_WIDTH = WIDTH * 10;
     30     private static final int XPOS_L0 = WIDTH * 0 + WIDTH / 2;
     31     private static final int XPOS_L1 = WIDTH * 1 + WIDTH / 2;
     32     private static final int XPOS_L2 = WIDTH * 2 + WIDTH / 2;
     33     private static final int XPOS_L3 = WIDTH * 3 + WIDTH / 2;
     34     private static final int XPOS_M0 = WIDTH * 4 + WIDTH / 2;
     35     private static final int XPOS_M1 = WIDTH * 5 + WIDTH / 2;
     36     private static final int XPOS_R3 = WIDTH * 6 + WIDTH / 2;
     37     private static final int XPOS_R2 = WIDTH * 7 + WIDTH / 2;
     38     private static final int XPOS_R1 = WIDTH * 8 + WIDTH / 2;
     39     private static final int XPOS_R0 = WIDTH * 9 + WIDTH / 2;
     40 
     41     @Override
     42     protected void setUp() throws Exception {
     43         super.setUp();
     44     }
     45 
     46     private static MoreKeysKeyboardParams createParams(final int numKeys, final int columnNum,
     47             final int coordXInParent) {
     48         final MoreKeysKeyboardParams params = new MoreKeysKeyboardParams();
     49         params.setParameters(numKeys, columnNum, WIDTH, HEIGHT, coordXInParent, KEYBOARD_WIDTH,
     50                 true /* isFixedOrderColumn */, 0 /* dividerWidth */);
     51         return params;
     52     }
     53 
     54     public void testLayoutError() {
     55         MoreKeysKeyboardParams params = null;
     56         try {
     57             final int fixColumns = KEYBOARD_WIDTH / WIDTH;
     58             params = createParams(fixColumns + 1, fixColumns + 1, HEIGHT);
     59             fail("Should throw IllegalArgumentException");
     60         } catch (IllegalArgumentException e) {
     61             // Too small keyboard to hold more keys keyboard.
     62         }
     63         assertNull("Too small keyboard to hold more keys keyboard", params);
     64     }
     65 
     66     // More keys keyboard layout test.
     67     // "[n]" represents n-th key position in more keys keyboard.
     68     // "<m>" is the default key.
     69 
     70     // <1>
     71     public void testLayout1KeyFix5M0() {
     72         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_M0);
     73         assertEquals("1 key fix 5 M0 columns", 1, params.mNumColumns);
     74         assertEquals("1 key fix 5 M0 rows", 1, params.mNumRows);
     75         assertEquals("1 key fix 5 M0 left", 0, params.mLeftKeys);
     76         assertEquals("1 key fix 5 M0 right", 1, params.mRightKeys);
     77         assertEquals("1 key fix 5 M0 <1>", 0, params.getColumnPos(0));
     78         assertEquals("1 key fix 5 M0 adjust", 0, params.mTopRowAdjustment);
     79         assertEquals("1 key fix 5 M0 default", WIDTH * 0, params.getDefaultKeyCoordX());
     80     }
     81 
     82     // |<1>
     83     public void testLayout1KeyFix5L0() {
     84         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_L0);
     85         assertEquals("1 key fix 5 L0 columns", 1, params.mNumColumns);
     86         assertEquals("1 key fix 5 L0 rows", 1, params.mNumRows);
     87         assertEquals("1 key fix 5 L0 left", 0, params.mLeftKeys);
     88         assertEquals("1 key fix 5 L0 right", 1, params.mRightKeys);
     89         assertEquals("1 key fix 5 L0 <1>", 0, params.getColumnPos(0));
     90         assertEquals("1 key fix 5 L0 adjust", 0, params.mTopRowAdjustment);
     91         assertEquals("1 key fix 5 L0 default", WIDTH * 0, params.getDefaultKeyCoordX());
     92     }
     93 
     94     // |___ <1>
     95     public void testLayout1KeyFix5L1() {
     96         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_L1);
     97         assertEquals("1 key fix 5 L1 columns", 1, params.mNumColumns);
     98         assertEquals("1 key fix 5 L1 rows", 1, params.mNumRows);
     99         assertEquals("1 key fix 5 L1 left", 0, params.mLeftKeys);
    100         assertEquals("1 key fix 5 L1 right", 1, params.mRightKeys);
    101         assertEquals("1 key fix 5 L1 <1>", 0, params.getColumnPos(0));
    102         assertEquals("1 key fix 5 L1 adjust", 0, params.mTopRowAdjustment);
    103         assertEquals("1 key fix 5 L1 default", WIDTH * 0, params.getDefaultKeyCoordX());
    104     }
    105 
    106     // |___ ___ <1>
    107     public void testLayout1KeyFix5L2() {
    108         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_L2);
    109         assertEquals("1 key fix 5 L2 columns", 1, params.mNumColumns);
    110         assertEquals("1 key fix 5 L2 rows", 1, params.mNumRows);
    111         assertEquals("1 key fix 5 L2 left", 0, params.mLeftKeys);
    112         assertEquals("1 key fix 5 L2 right", 1, params.mRightKeys);
    113         assertEquals("1 key fix 5 L2 <1>", 0, params.getColumnPos(0));
    114         assertEquals("1 key fix 5 L2 adjust", 0, params.mTopRowAdjustment);
    115         assertEquals("1 key fix 5 L2 default", WIDTH * 0, params.getDefaultKeyCoordX());
    116     }
    117 
    118     // <1>|
    119     public void testLayout1KeyFix5R0() {
    120         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_R0);
    121         assertEquals("1 key fix 5 R0 columns", 1, params.mNumColumns);
    122         assertEquals("1 key fix 5 R0 rows", 1, params.mNumRows);
    123         assertEquals("1 key fix 5 R0 left", 0, params.mLeftKeys);
    124         assertEquals("1 key fix 5 R0 right", 1, params.mRightKeys);
    125         assertEquals("1 key fix 5 R0 <1>", 0, params.getColumnPos(0));
    126         assertEquals("1 key fix 5 R0 adjust", 0, params.mTopRowAdjustment);
    127         assertEquals("1 key fix 5 R0 default", WIDTH * 0, params.getDefaultKeyCoordX());
    128     }
    129 
    130     // <1> ___|
    131     public void testLayout1KeyFix5R1() {
    132         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_R1);
    133         assertEquals("1 key fix 5 R1 columns", 1, params.mNumColumns);
    134         assertEquals("1 key fix 5 R1 rows", 1, params.mNumRows);
    135         assertEquals("1 key fix 5 R1 left", 0, params.mLeftKeys);
    136         assertEquals("1 key fix 5 R1 right", 1, params.mRightKeys);
    137         assertEquals("1 key fix 5 R1 <1>", 0, params.getColumnPos(0));
    138         assertEquals("1 key fix 5 R1 adjust", 0, params.mTopRowAdjustment);
    139         assertEquals("1 key fix 5 R1 default", WIDTH * 0, params.getDefaultKeyCoordX());
    140     }
    141 
    142     // <1> ___ ___|
    143     public void testLayout1KeyFix5R2() {
    144         MoreKeysKeyboardParams params = createParams(1, 5, XPOS_R2);
    145         assertEquals("1 key fix 5 R2 columns", 1, params.mNumColumns);
    146         assertEquals("1 key fix 5 R2 rows", 1, params.mNumRows);
    147         assertEquals("1 key fix 5 R2 left", 0, params.mLeftKeys);
    148         assertEquals("1 key fix 5 R2 right", 1, params.mRightKeys);
    149         assertEquals("1 key fix 5 R2 <1>", 0, params.getColumnPos(0));
    150         assertEquals("1 key fix 5 R2 adjust", 0, params.mTopRowAdjustment);
    151         assertEquals("1 key fix 5 R2 default", WIDTH * 0, params.getDefaultKeyCoordX());
    152     }
    153 
    154     // <1> [2]
    155     public void testLayout2KeyFix5M0() {
    156         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_M0);
    157         assertEquals("2 key fix 5 M0 columns", 2, params.mNumColumns);
    158         assertEquals("2 key fix 5 M0 rows", 1, params.mNumRows);
    159         assertEquals("2 key fix 5 M0 left", 0, params.mLeftKeys);
    160         assertEquals("2 key fix 5 M0 right", 2, params.mRightKeys);
    161         assertEquals("2 key fix 5 M0 <1>", 0, params.getColumnPos(0));
    162         assertEquals("2 key fix 5 M0 [2]", 1, params.getColumnPos(1));
    163         assertEquals("2 key fix 5 M0 adjust", 0, params.mTopRowAdjustment);
    164         assertEquals("2 key fix 5 M0 default", WIDTH * 0, params.getDefaultKeyCoordX());
    165     }
    166 
    167     // |<1> [2]
    168     public void testLayout2KeyFix5L0() {
    169         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_L0);
    170         assertEquals("2 key fix 5 L0 columns", 2, params.mNumColumns);
    171         assertEquals("2 key fix 5 L0 rows", 1, params.mNumRows);
    172         assertEquals("2 key fix 5 L0 left", 0, params.mLeftKeys);
    173         assertEquals("2 key fix 5 L0 right", 2, params.mRightKeys);
    174         assertEquals("2 key fix 5 L0 <1>", 0, params.getColumnPos(0));
    175         assertEquals("2 key fix 5 L0 [2]", 1, params.getColumnPos(1));
    176         assertEquals("2 key fix 5 L0 adjust", 0, params.mTopRowAdjustment);
    177         assertEquals("2 key fix 5 L0 default", WIDTH * 0, params.getDefaultKeyCoordX());
    178     }
    179 
    180     // |___ <1> [2]
    181     public void testLayout2KeyFix5L1() {
    182         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_L1);
    183         assertEquals("2 key fix 5 L1 columns", 2, params.mNumColumns);
    184         assertEquals("2 key fix 5 L1 rows", 1, params.mNumRows);
    185         assertEquals("2 key fix 5 L1 left", 0, params.mLeftKeys);
    186         assertEquals("2 key fix 5 L1 right", 2, params.mRightKeys);
    187         assertEquals("2 key fix 5 L1 <1>", 0, params.getColumnPos(0));
    188         assertEquals("2 key fix 5 L1 [2]", 1, params.getColumnPos(1));
    189         assertEquals("2 key fix 5 L1 adjust", 0, params.mTopRowAdjustment);
    190         assertEquals("2 key fix 5 L1 default", WIDTH * 0, params.getDefaultKeyCoordX());
    191     }
    192 
    193     // |___ ___ <1> [2]
    194     public void testLayout2KeyFix5L2() {
    195         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_L2);
    196         assertEquals("2 key fix 5 L2 columns", 2, params.mNumColumns);
    197         assertEquals("2 key fix 5 L2 rows", 1, params.mNumRows);
    198         assertEquals("2 key fix 5 L2 left", 0, params.mLeftKeys);
    199         assertEquals("2 key fix 5 L2 right", 2, params.mRightKeys);
    200         assertEquals("2 key fix 5 L2 <1>", 0, params.getColumnPos(0));
    201         assertEquals("2 key fix 5 L2 [2]", 1, params.getColumnPos(1));
    202         assertEquals("2 key fix 5 L2 adjust", 0, params.mTopRowAdjustment);
    203         assertEquals("2 key fix 5 L2 default", WIDTH * 0, params.getDefaultKeyCoordX());
    204     }
    205 
    206     // [1] <2>|
    207     public void testLayout2KeyFix5R0() {
    208         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_R0);
    209         assertEquals("2 key fix 5 R0 columns", 2, params.mNumColumns);
    210         assertEquals("2 key fix 5 R0 rows", 1, params.mNumRows);
    211         assertEquals("2 key fix 5 R0 left", 1, params.mLeftKeys);
    212         assertEquals("2 key fix 5 R0 right", 1, params.mRightKeys);
    213         assertEquals("2 key fix 5 R0 [1]", -1, params.getColumnPos(0));
    214         assertEquals("2 key fix 5 R0 <2>", 0, params.getColumnPos(1));
    215         assertEquals("2 key fix 5 R0 adjust", 0, params.mTopRowAdjustment);
    216         assertEquals("2 key fix 5 R0 default", WIDTH * 1, params.getDefaultKeyCoordX());
    217     }
    218 
    219     // [1] <2> ___|
    220     public void testLayout2KeyFix5R1() {
    221         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_R1);
    222         assertEquals("2 key fix 5 R1 columns", 2, params.mNumColumns);
    223         assertEquals("2 key fix 5 R1 rows", 1, params.mNumRows);
    224         assertEquals("2 key fix 5 R1 left", 1, params.mLeftKeys);
    225         assertEquals("2 key fix 5 R1 right", 1, params.mRightKeys);
    226         assertEquals("2 key fix 5 R1 [1]", -1, params.getColumnPos(0));
    227         assertEquals("2 key fix 5 R1 <2>", 0, params.getColumnPos(1));
    228         assertEquals("2 key fix 5 R1 adjust", 0, params.mTopRowAdjustment);
    229         assertEquals("2 key fix 5 R1 default", WIDTH * 1, params.getDefaultKeyCoordX());
    230     }
    231 
    232     // <1> [2] ___|
    233     public void testLayout2KeyFix5R2() {
    234         MoreKeysKeyboardParams params = createParams(2, 5, XPOS_R2);
    235         assertEquals("2 key fix 5 R2 columns", 2, params.mNumColumns);
    236         assertEquals("2 key fix 5 R2 rows", 1, params.mNumRows);
    237         assertEquals("2 key fix 5 R2 left", 0, params.mLeftKeys);
    238         assertEquals("2 key fix 5 R2 right", 2, params.mRightKeys);
    239         assertEquals("2 key fix 5 R2 <1>", 0, params.getColumnPos(0));
    240         assertEquals("2 key fix 5 R2 [2]", 1, params.getColumnPos(1));
    241         assertEquals("2 key fix 5 R2 adjust", 0, params.mTopRowAdjustment);
    242         assertEquals("2 key fix 5 R2 default", WIDTH * 0, params.getDefaultKeyCoordX());
    243     }
    244 
    245     // [3]
    246     // <1> [2]
    247     public void testLayout3KeyFix2M0() {
    248         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_M0);
    249         assertEquals("3 key fix 2 M0 columns", 2, params.mNumColumns);
    250         assertEquals("3 key fix 2 M0 rows", 2, params.mNumRows);
    251         assertEquals("3 key fix 2 M0 left", 0, params.mLeftKeys);
    252         assertEquals("3 key fix 2 M0 right", 2, params.mRightKeys);
    253         assertEquals("3 key fix 2 M0 <1>", 0, params.getColumnPos(0));
    254         assertEquals("3 key fix 2 M0 [2]", 1, params.getColumnPos(1));
    255         assertEquals("3 key fix 2 M0 [3]", 0, params.getColumnPos(2));
    256         assertEquals("3 key fix 2 M0 adjust", 0, params.mTopRowAdjustment);
    257         assertEquals("3 key fix 2 M0 default", WIDTH * 0, params.getDefaultKeyCoordX());
    258     }
    259 
    260     // |[3]
    261     // |<1> [2]
    262     public void testLayout3KeyFix2L0() {
    263         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_L0);
    264         assertEquals("3 key fix 2 L0 columns", 2, params.mNumColumns);
    265         assertEquals("3 key fix 2 L0 rows", 2, params.mNumRows);
    266         assertEquals("3 key fix 2 L0 left", 0, params.mLeftKeys);
    267         assertEquals("3 key fix 2 L0 right", 2, params.mRightKeys);
    268         assertEquals("3 key fix 2 L0 <1>", 0, params.getColumnPos(0));
    269         assertEquals("3 key fix 2 L0 [2]", 1, params.getColumnPos(1));
    270         assertEquals("3 key fix 2 L0 [3]", 0, params.getColumnPos(2));
    271         assertEquals("3 key fix 2 L0 adjust", 0, params.mTopRowAdjustment);
    272         assertEquals("3 key fix 2 L0 default", WIDTH * 0, params.getDefaultKeyCoordX());
    273     }
    274 
    275     // |___ [3]
    276     // |___ <1> [2]
    277     public void testLayout3KeyFix2L1() {
    278         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_L1);
    279         assertEquals("3 key fix 2 L1 columns", 2, params.mNumColumns);
    280         assertEquals("3 key fix 2 L1 rows", 2, params.mNumRows);
    281         assertEquals("3 key fix 2 L1 left", 0, params.mLeftKeys);
    282         assertEquals("3 key fix 2 L1 right", 2, params.mRightKeys);
    283         assertEquals("3 key fix 2 L1 <1>", 0, params.getColumnPos(0));
    284         assertEquals("3 key fix 2 L1 [2]", 1, params.getColumnPos(1));
    285         assertEquals("3 key fix 2 L1 [3]", 0, params.getColumnPos(2));
    286         assertEquals("3 key fix 2 L1 adjust", 0, params.mTopRowAdjustment);
    287         assertEquals("3 key fix 2 L1 default", WIDTH * 0, params.getDefaultKeyCoordX());
    288     }
    289 
    290     // |        [3]
    291     // |___ ___ <1> [2]
    292     public void testLayout3KeyFix2L2() {
    293         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_L2);
    294         assertEquals("3 key fix 2 L2 columns", 2, params.mNumColumns);
    295         assertEquals("3 key fix 2 L2 rows", 2, params.mNumRows);
    296         assertEquals("3 key fix 2 L2 left", 0, params.mLeftKeys);
    297         assertEquals("3 key fix 2 L2 right", 2, params.mRightKeys);
    298         assertEquals("3 key fix 2 L2 <1>", 0, params.getColumnPos(0));
    299         assertEquals("3 key fix 2 L2 [2]", 1, params.getColumnPos(1));
    300         assertEquals("3 key fix 2 L2 [3]", 0, params.getColumnPos(2));
    301         assertEquals("3 key fix 2 L2 adjust", 0, params.mTopRowAdjustment);
    302         assertEquals("3 key fix 2 L2 default", WIDTH * 0, params.getDefaultKeyCoordX());
    303     }
    304 
    305     //     [3]|
    306     // [1] <2>|
    307     public void testLayout3KeyFix2R0() {
    308         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_R0);
    309         assertEquals("3 key fix 2 R0 columns", 2, params.mNumColumns);
    310         assertEquals("3 key fix 2 R0 rows", 2, params.mNumRows);
    311         assertEquals("3 key fix 2 R0 left", 1, params.mLeftKeys);
    312         assertEquals("3 key fix 2 R0 right", 1, params.mRightKeys);
    313         assertEquals("3 key fix 2 R0 [1]", -1, params.getColumnPos(0));
    314         assertEquals("3 key fix 2 R0 <2>", 0, params.getColumnPos(1));
    315         assertEquals("3 key fix 2 R0 [3]", 0, params.getColumnPos(2));
    316         assertEquals("3 key fix 2 R0 adjust", 0, params.mTopRowAdjustment);
    317         assertEquals("3 key fix 2 R0 default", WIDTH * 1, params.getDefaultKeyCoordX());
    318     }
    319 
    320     //     [3] ___|
    321     // [1] <2> ___|
    322     public void testLayout3KeyFix2R1() {
    323         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_R1);
    324         assertEquals("3 key fix 2 R1 columns", 2, params.mNumColumns);
    325         assertEquals("3 key fix 2 R1 rows", 2, params.mNumRows);
    326         assertEquals("3 key fix 2 R1 left", 1, params.mLeftKeys);
    327         assertEquals("3 key fix 2 R1 right", 1, params.mRightKeys);
    328         assertEquals("3 key fix 2 R1 [1]", -1, params.getColumnPos(0));
    329         assertEquals("3 key fix 2 R1 <2>", 0, params.getColumnPos(1));
    330         assertEquals("3 key fix 2 R1 [3]", 0, params.getColumnPos(2));
    331         assertEquals("3 key fix 2 R1 adjust", 0, params.mTopRowAdjustment);
    332         assertEquals("3 key fix 2 R1 default", WIDTH * 1, params.getDefaultKeyCoordX());
    333     }
    334 
    335     // [3]     ___|
    336     // <1> [2] ___|
    337     public void testLayout3KeyFix2R2() {
    338         MoreKeysKeyboardParams params = createParams(3, 2, XPOS_R2);
    339         assertEquals("3 key fix 2 R2 columns", 2, params.mNumColumns);
    340         assertEquals("3 key fix 2 R2 rows", 2, params.mNumRows);
    341         assertEquals("3 key fix 2 R2 left", 0, params.mLeftKeys);
    342         assertEquals("3 key fix 2 R2 right", 2, params.mRightKeys);
    343         assertEquals("3 key fix 2 R2 <1>", 0, params.getColumnPos(0));
    344         assertEquals("3 key fix 2 R2 [2]", 1, params.getColumnPos(1));
    345         assertEquals("3 key fix 2 R2 [3]", 0, params.getColumnPos(2));
    346         assertEquals("3 key fix 2 R2 adjust", 0, params.mTopRowAdjustment);
    347         assertEquals("3 key fix 2 R2 default", WIDTH * 0, params.getDefaultKeyCoordX());
    348     }
    349 
    350     // [3] [4]
    351     // <1> [2]
    352     public void testLayout4KeyFix2M0() {
    353         MoreKeysKeyboardParams params = createParams(4, 2, XPOS_M0);
    354         assertEquals("3 key fix 2 M0 columns", 2, params.mNumColumns);
    355         assertEquals("3 key fix 2 M0 rows", 2, params.mNumRows);
    356         assertEquals("3 key fix 2 M0 left", 0, params.mLeftKeys);
    357         assertEquals("3 key fix 2 M0 right", 2, params.mRightKeys);
    358         assertEquals("3 key fix 2 M0 <1>", 0, params.getColumnPos(0));
    359         assertEquals("3 key fix 2 M0 [2]", 1, params.getColumnPos(1));
    360         assertEquals("3 key fix 2 M0 [3]", 0, params.getColumnPos(2));
    361         assertEquals("3 key fix 2 M0 [4]", 1, params.getColumnPos(3));
    362         assertEquals("3 key fix 2 M0 adjust", 0, params.mTopRowAdjustment);
    363         assertEquals("3 key fix 2 M0 default", WIDTH * 0, params.getDefaultKeyCoordX());
    364     }
    365 
    366     // |[3] [4]
    367     // |<1> [2]
    368     public void testLayout4KeyFix2L0() {
    369         MoreKeysKeyboardParams params = createParams(4, 2, XPOS_L0);
    370         assertEquals("3 key fix 2 L0 columns", 2, params.mNumColumns);
    371         assertEquals("3 key fix 2 L0 rows", 2, params.mNumRows);
    372         assertEquals("3 key fix 2 L0 left", 0, params.mLeftKeys);
    373         assertEquals("3 key fix 2 L0 right", 2, params.mRightKeys);
    374         assertEquals("3 key fix 2 L0 <1>", 0, params.getColumnPos(0));
    375         assertEquals("3 key fix 2 L0 [2]", 1, params.getColumnPos(1));
    376         assertEquals("3 key fix 2 L0 [3]", 0, params.getColumnPos(2));
    377         assertEquals("3 key fix 2 L0 [4]", 1, params.getColumnPos(3));
    378         assertEquals("3 key fix 2 L0 adjust", 0, params.mTopRowAdjustment);
    379         assertEquals("3 key fix 2 L0 default", WIDTH * 0, params.getDefaultKeyCoordX());
    380     }
    381 
    382     // |___ [3] [4]
    383     // |___ <1> [2]
    384     public void testLayout4KeyFix2L1() {
    385         MoreKeysKeyboardParams params = createParams(4, 2, XPOS_L1);
    386         assertEquals("3 key fix 2 L1 columns", 2, params.mNumColumns);
    387         assertEquals("3 key fix 2 L1 rows", 2, params.mNumRows);
    388         assertEquals("3 key fix 2 L1 left", 0, params.mLeftKeys);
    389         assertEquals("3 key fix 2 L1 right", 2, params.mRightKeys);
    390         assertEquals("3 key fix 2 L1 <1>", 0, params.getColumnPos(0));
    391         assertEquals("3 key fix 2 L1 [2]", 1, params.getColumnPos(1));
    392         assertEquals("3 key fix 2 L1 [3]", 0, params.getColumnPos(2));
    393         assertEquals("3 key fix 2 L1 [4]", 1, params.getColumnPos(3));
    394         assertEquals("3 key fix 2 L1 adjust", 0, params.mTopRowAdjustment);
    395         assertEquals("3 key fix 2 L1 default", WIDTH * 0, params.getDefaultKeyCoordX());
    396     }
    397 
    398     // |        [3] [4]
    399     // |___ ___ <1> [2]
    400     public void testLayout4KeyFix2L2() {
    401         MoreKeysKeyboardParams params = createParams(4, 2, XPOS_L2);
    402         assertEquals("3 key fix 2 L2 columns", 2, params.mNumColumns);
    403         assertEquals("3 key fix 2 L2 rows", 2, params.mNumRows);
    404         assertEquals("3 key fix 2 L2 left", 0, params.mLeftKeys);
    405         assertEquals("3 key fix 2 L2 right", 2, params.mRightKeys);
    406         assertEquals("3 key fix 2 L2 <1>", 0, params.getColumnPos(0));
    407         assertEquals("3 key fix 2 L2 [2]", 1, params.getColumnPos(1));
    408         assertEquals("3 key fix 2 L2 [3]", 0, params.getColumnPos(2));
    409         assertEquals("3 key fix 2 L2 [4]", 1, params.getColumnPos(3));
    410         assertEquals("3 key fix 2 L2 adjust", 0, params.mTopRowAdjustment);
    411         assertEquals("3 key fix 2 L2 default", WIDTH * 0, params.getDefaultKeyCoordX());
    412     }
    413 
    414     // [3] [4]|
    415     // [1] <2>|
    416     public void testLayout4KeyFix2R0() {
    417         MoreKeysKeyboardParams params = createParams(4, 2, XPOS_R0);
    418         assertEquals("3 key fix 2 R0 columns", 2, params.mNumColumns);
    419         assertEquals("3 key fix 2 R0 rows", 2, params.mNumRows);
    420         assertEquals("3 key fix 2 R0 left", 1, params.mLeftKeys);
    421         assertEquals("3 key fix 2 R0 right", 1, params.mRightKeys);
    422         assertEquals("3 key fix 2 R0 [1]", -1, params.getColumnPos(0));
    423         assertEquals("3 key fix 2 R0 <2>", 0, params.getColumnPos(1));
    424         assertEquals("3 key fix 2 R0 [3]", -1, params.getColumnPos(2));
    425         assertEquals("3 key fix 2 R0 [4]", 0, params.getColumnPos(3));
    426         assertEquals("3 key fix 2 R0 adjust", 0, params.mTopRowAdjustment);
    427         assertEquals("3 key fix 2 R0 default", WIDTH * 1, params.getDefaultKeyCoordX());
    428     }
    429 
    430     // [3] [4] ___|
    431     // [1] <2> ___|
    432     public void testLayout4KeyFix2R1() {
    433         MoreKeysKeyboardParams params = createParams(4, 2, XPOS_R1);
    434         assertEquals("3 key fix 2 R1 columns", 2, params.mNumColumns);
    435         assertEquals("3 key fix 2 R1 rows", 2, params.mNumRows);
    436         assertEquals("3 key fix 2 R1 left", 1, params.mLeftKeys);
    437         assertEquals("3 key fix 2 R1 right", 1, params.mRightKeys);
    438         assertEquals("3 key fix 2 R1 [1]", -1, params.getColumnPos(0));
    439         assertEquals("3 key fix 2 R1 <2>", 0, params.getColumnPos(1));
    440         assertEquals("3 key fix 2 R1 [3]", -1, params.getColumnPos(2));
    441         assertEquals("3 key fix 2 R1 [4]", 0, params.getColumnPos(3));
    442         assertEquals("3 key fix 2 R1 adjust", 0, params.mTopRowAdjustment);
    443         assertEquals("3 key fix 2 R1 default", WIDTH * 1, params.getDefaultKeyCoordX());
    444     }
    445 
    446     // [3] [4] ___|
    447     // <1> [2] ___|
    448     public void testLayout4KeyFix2R2() {
    449         MoreKeysKeyboardParams params = createParams(4, 2, XPOS_R2);
    450         assertEquals("3 key fix 2 R2 columns", 2, params.mNumColumns);
    451         assertEquals("3 key fix 2 R2 rows", 2, params.mNumRows);
    452         assertEquals("3 key fix 2 R2 left", 0, params.mLeftKeys);
    453         assertEquals("3 key fix 2 R2 right", 2, params.mRightKeys);
    454         assertEquals("3 key fix 2 R2 <1>", 0, params.getColumnPos(0));
    455         assertEquals("3 key fix 2 R2 [2]", 1, params.getColumnPos(1));
    456         assertEquals("3 key fix 2 R2 [3]", 0, params.getColumnPos(2));
    457         assertEquals("3 key fix 2 R2 [4]", 1, params.getColumnPos(3));
    458         assertEquals("3 key fix 2 R2 adjust", 0, params.mTopRowAdjustment);
    459         assertEquals("3 key fix 2 R2 default", WIDTH * 0, params.getDefaultKeyCoordX());
    460     }
    461 
    462     // [1] <2> [3]
    463     public void testLayout3KeyFix5M0() {
    464         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_M0);
    465         assertEquals("3 key fix 5 columns", 3, params.mNumColumns);
    466         assertEquals("3 key fix 5 rows", 1, params.mNumRows);
    467         assertEquals("3 key fix 5 left", 1, params.mLeftKeys);
    468         assertEquals("3 key fix 5 right", 2, params.mRightKeys);
    469         assertEquals("3 key fix 5 [1]", -1, params.getColumnPos(0));
    470         assertEquals("3 key fix 5 <2>", 0, params.getColumnPos(1));
    471         assertEquals("3 key fix 5 [3]", 1, params.getColumnPos(2));
    472         assertEquals("3 key fix 5 adjust", 0, params.mTopRowAdjustment);
    473         assertEquals("3 key fix 5 default", WIDTH * 1, params.getDefaultKeyCoordX());
    474     }
    475 
    476     // |<1> [2] [3]
    477     public void testLayout3KeyFix5L0() {
    478         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_L0);
    479         assertEquals("3 key fix 5 L0 columns", 3, params.mNumColumns);
    480         assertEquals("3 key fix 5 L0 rows", 1, params.mNumRows);
    481         assertEquals("3 key fix 5 L0 left", 0, params.mLeftKeys);
    482         assertEquals("3 key fix 5 L0 right", 3, params.mRightKeys);
    483         assertEquals("3 key fix 5 L0 <1>", 0, params.getColumnPos(0));
    484         assertEquals("3 key fix 5 L0 [2]", 1, params.getColumnPos(1));
    485         assertEquals("3 key fix 5 L0 [3]", 2, params.getColumnPos(2));
    486         assertEquals("3 key fix 5 L0 adjust", 0, params.mTopRowAdjustment);
    487         assertEquals("3 key fix 5 L0 default", WIDTH * 0, params.getDefaultKeyCoordX());
    488     }
    489 
    490     // |___ <1> [2] [3]
    491     public void testLayout3KeyFix5L1() {
    492         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_L1);
    493         assertEquals("3 key fix 5 L1 columns", 3, params.mNumColumns);
    494         assertEquals("3 key fix 5 L1 rows", 1, params.mNumRows);
    495         assertEquals("3 key fix 5 L1 left", 0, params.mLeftKeys);
    496         assertEquals("3 key fix 5 L1 right", 3, params.mRightKeys);
    497         assertEquals("3 key fix 5 L1 <1>", 0, params.getColumnPos(0));
    498         assertEquals("3 key fix 5 L1 [2]", 1, params.getColumnPos(1));
    499         assertEquals("3 key fix 5 L1 [3]", 2, params.getColumnPos(2));
    500         assertEquals("3 key fix 5 L1 adjust", 0, params.mTopRowAdjustment);
    501         assertEquals("3 key fix 5 L1 default", WIDTH * 0, params.getDefaultKeyCoordX());
    502     }
    503 
    504     // |___ [1] <2> [3]
    505     public void testLayout3KeyFix5L2() {
    506         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_L2);
    507         assertEquals("3 key fix 5 L2 columns", 3, params.mNumColumns);
    508         assertEquals("3 key fix 5 L2 rows", 1, params.mNumRows);
    509         assertEquals("3 key fix 5 L2 left", 1, params.mLeftKeys);
    510         assertEquals("3 key fix 5 L2 right", 2, params.mRightKeys);
    511         assertEquals("3 key fix 5 L2 [1]", -1, params.getColumnPos(0));
    512         assertEquals("3 key fix 5 L2 <2>", 0, params.getColumnPos(1));
    513         assertEquals("3 key fix 5 L2 [3]", 1, params.getColumnPos(2));
    514         assertEquals("3 key fix 5 L2 adjust", 0, params.mTopRowAdjustment);
    515         assertEquals("3 key fix 5 L2 default", WIDTH * 1, params.getDefaultKeyCoordX());
    516     }
    517 
    518     // [1] [2] <3>|
    519     public void testLayout3KeyFix5R0() {
    520         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_R0);
    521         assertEquals("3 key fix 5 R0 columns", 3, params.mNumColumns);
    522         assertEquals("3 key fix 5 R0 rows", 1, params.mNumRows);
    523         assertEquals("3 key fix 5 R0 left", 2, params.mLeftKeys);
    524         assertEquals("3 key fix 5 R0 right", 1, params.mRightKeys);
    525         assertEquals("3 key fix 5 R0 [1]", -2, params.getColumnPos(0));
    526         assertEquals("3 key fix 5 R0 [2]", -1, params.getColumnPos(1));
    527         assertEquals("3 key fix 5 R0 <3>", 0, params.getColumnPos(2));
    528         assertEquals("3 key fix 5 R0 adjust", 0, params.mTopRowAdjustment);
    529         assertEquals("3 key fix 5 R0 default", WIDTH * 2, params.getDefaultKeyCoordX());
    530     }
    531 
    532     // [1] [2] <3> ___|
    533     public void testLayout3KeyFix5R1() {
    534         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_R1);
    535         assertEquals("3 key fix 5 R1 columns", 3, params.mNumColumns);
    536         assertEquals("3 key fix 5 R1 rows", 1, params.mNumRows);
    537         assertEquals("3 key fix 5 R1 left", 2, params.mLeftKeys);
    538         assertEquals("3 key fix 5 R1 right", 1, params.mRightKeys);
    539         assertEquals("3 key fix 5 R1 [1]", -2, params.getColumnPos(0));
    540         assertEquals("3 key fix 5 R1 [2]", -1, params.getColumnPos(1));
    541         assertEquals("3 key fix 5 R1 <3>", 0, params.getColumnPos(2));
    542         assertEquals("3 key fix 5 R1 adjust", 0, params.mTopRowAdjustment);
    543         assertEquals("3 key fix 5 R1 default", WIDTH * 2, params.getDefaultKeyCoordX());
    544     }
    545 
    546     // [1] <2> [3] ___|
    547     public void testLayout3KeyFix5R2() {
    548         MoreKeysKeyboardParams params = createParams(3, 5, XPOS_R2);
    549         assertEquals("3 key fix 5 R2 columns", 3, params.mNumColumns);
    550         assertEquals("3 key fix 5 R2 rows", 1, params.mNumRows);
    551         assertEquals("3 key fix 5 R2 left", 1, params.mLeftKeys);
    552         assertEquals("3 key fix 5 R2 right", 2, params.mRightKeys);
    553         assertEquals("3 key fix 5 R2 [1]", -1, params.getColumnPos(0));
    554         assertEquals("3 key fix 5 R2 <2>", 0, params.getColumnPos(1));
    555         assertEquals("3 key fix 5 R2 [3]", 1, params.getColumnPos(2));
    556         assertEquals("3 key fix 5 R2 adjust", 0, params.mTopRowAdjustment);
    557         assertEquals("3 key fix 5 R2 default", WIDTH * 1, params.getDefaultKeyCoordX());
    558     }
    559 
    560     //     [4]
    561     // [1] <2> [3]
    562     public void testLayout4KeyFix3M0() {
    563         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_M0);
    564         assertEquals("4 key fix 3 M0 columns", 3, params.mNumColumns);
    565         assertEquals("4 key fix 3 M0 rows", 2, params.mNumRows);
    566         assertEquals("4 key fix 3 M0 left", 1, params.mLeftKeys);
    567         assertEquals("4 key fix 3 M0 right", 2, params.mRightKeys);
    568         assertEquals("4 key fix 3 M0 [1]", -1, params.getColumnPos(0));
    569         assertEquals("4 key fix 3 M0 <2>", 0, params.getColumnPos(1));
    570         assertEquals("4 key fix 3 M0 [3]", 1, params.getColumnPos(2));
    571         assertEquals("4 key fix 3 M0 [4]", 0, params.getColumnPos(3));
    572         assertEquals("4 key fix 3 M0 adjust", 0, params.mTopRowAdjustment);
    573         assertEquals("4 key fix 3 M0 default", WIDTH * 1, params.getDefaultKeyCoordX());
    574     }
    575 
    576     // |[4]
    577     // |<1> [2] [3]
    578     public void testLayout4KeyFix3L0() {
    579         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_L0);
    580         assertEquals("4 key fix 3 L0 columns", 3, params.mNumColumns);
    581         assertEquals("4 key fix 3 L0 rows", 2, params.mNumRows);
    582         assertEquals("4 key fix 3 L0 left", 0, params.mLeftKeys);
    583         assertEquals("4 key fix 3 L0 right", 3, params.mRightKeys);
    584         assertEquals("4 key fix 3 L0 <1>", 0, params.getColumnPos(0));
    585         assertEquals("4 key fix 3 L0 [2]", 1, params.getColumnPos(1));
    586         assertEquals("4 key fix 3 L0 [3]", 2, params.getColumnPos(2));
    587         assertEquals("4 key fix 3 L0 [4]", 0, params.getColumnPos(3));
    588         assertEquals("4 key fix 3 L0 adjust", 0, params.mTopRowAdjustment);
    589         assertEquals("4 key fix 3 L0 default", WIDTH * 0, params.getDefaultKeyCoordX());
    590     }
    591 
    592     // |___ [4]
    593     // |___ <1> [2] [3]
    594     public void testLayout4KeyFix3L1() {
    595         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_L1);
    596         assertEquals("4 key fix 3 L1 columns", 3, params.mNumColumns);
    597         assertEquals("4 key fix 3 L1 rows", 2, params.mNumRows);
    598         assertEquals("4 key fix 3 L1 left", 0, params.mLeftKeys);
    599         assertEquals("4 key fix 3 L1 right", 3, params.mRightKeys);
    600         assertEquals("4 key fix 3 L1 <1>", 0, params.getColumnPos(0));
    601         assertEquals("4 key fix 3 L1 [2]", 1, params.getColumnPos(1));
    602         assertEquals("4 key fix 3 L1 [3]", 2, params.getColumnPos(2));
    603         assertEquals("4 key fix 3 L1 [4]", 0, params.getColumnPos(3));
    604         assertEquals("4 key fix 3 L1 adjust", 0, params.mTopRowAdjustment);
    605         assertEquals("4 key fix 3 L1 default", WIDTH * 0, params.getDefaultKeyCoordX());
    606     }
    607 
    608     // |___ ___     [4]
    609     // |___ ___ [1] <2> [3]
    610     public void testLayout4KeyFix3L2() {
    611         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_L2);
    612         assertEquals("4 key fix 3 L2 columns", 3, params.mNumColumns);
    613         assertEquals("4 key fix 3 L2 rows", 2, params.mNumRows);
    614         assertEquals("4 key fix 3 L2 left", 1, params.mLeftKeys);
    615         assertEquals("4 key fix 3 L2 right", 2, params.mRightKeys);
    616         assertEquals("4 key fix 3 L2 [1]", -1, params.getColumnPos(0));
    617         assertEquals("4 key fix 3 L2 <2>", 0, params.getColumnPos(1));
    618         assertEquals("4 key fix 3 L2 [3]", 1, params.getColumnPos(2));
    619         assertEquals("4 key fix 3 L2 [4]", 0, params.getColumnPos(3));
    620         assertEquals("4 key fix 3 L2 adjust", 0, params.mTopRowAdjustment);
    621         assertEquals("4 key fix 3 L2 default", WIDTH * 1, params.getDefaultKeyCoordX());
    622     }
    623 
    624     //         [4]|
    625     // [1] [2] <3>|
    626     public void testLayout4KeyFix3R0() {
    627         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_R0);
    628         assertEquals("4 key fix 3 R0 columns", 3, params.mNumColumns);
    629         assertEquals("4 key fix 3 R0 rows", 2, params.mNumRows);
    630         assertEquals("4 key fix 3 R0 left", 2, params.mLeftKeys);
    631         assertEquals("4 key fix 3 R0 right", 1, params.mRightKeys);
    632         assertEquals("4 key fix 3 R0 [1]", -2, params.getColumnPos(0));
    633         assertEquals("4 key fix 3 R0 [2]", -1, params.getColumnPos(1));
    634         assertEquals("4 key fix 3 R0 <3>", 0, params.getColumnPos(2));
    635         assertEquals("4 key fix 3 R0 [4]", 0, params.getColumnPos(3));
    636         assertEquals("4 key fix 3 R0 adjust", 0, params.mTopRowAdjustment);
    637         assertEquals("4 key fix 3 R0 default", WIDTH * 2, params.getDefaultKeyCoordX());
    638     }
    639 
    640     //         [4] ___|
    641     // [1] [2] <3> ___|
    642     public void testLayout4KeyFix3R1() {
    643         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_R1);
    644         assertEquals("4 key fix 3 R1 columns", 3, params.mNumColumns);
    645         assertEquals("4 key fix 3 R1 rows", 2, params.mNumRows);
    646         assertEquals("4 key fix 3 R1 left", 2, params.mLeftKeys);
    647         assertEquals("4 key fix 3 R1 right", 1, params.mRightKeys);
    648         assertEquals("4 key fix 3 R1 [1]", -2, params.getColumnPos(0));
    649         assertEquals("4 key fix 3 R1 [2]", -1, params.getColumnPos(1));
    650         assertEquals("4 key fix 3 R1 <3>", 0, params.getColumnPos(2));
    651         assertEquals("4 key fix 3 R1 [4]", 0, params.getColumnPos(3));
    652         assertEquals("4 key fix 3 R1 adjust", 0, params.mTopRowAdjustment);
    653         assertEquals("4 key fix 3 R1 default", WIDTH * 2, params.getDefaultKeyCoordX());
    654     }
    655 
    656     //     [4]     ___|
    657     // [1] <2> [3] ___|
    658     public void testLayout4KeyFix3R2() {
    659         MoreKeysKeyboardParams params = createParams(4, 3, XPOS_R2);
    660         assertEquals("4 key fix 3 R2 columns", 3, params.mNumColumns);
    661         assertEquals("4 key fix 3 R2 rows", 2, params.mNumRows);
    662         assertEquals("4 key fix 3 R2 left", 1, params.mLeftKeys);
    663         assertEquals("4 key fix 3 R2 right", 2, params.mRightKeys);
    664         assertEquals("4 key fix 3 R2 [1]", -1, params.getColumnPos(0));
    665         assertEquals("4 key fix 3 R2 <2>", 0, params.getColumnPos(1));
    666         assertEquals("4 key fix 3 R2 [3]", 1, params.getColumnPos(2));
    667         assertEquals("4 key fix 3 R2 [4]", 0, params.getColumnPos(3));
    668         assertEquals("4 key fix 3 R2 adjust", 0, params.mTopRowAdjustment);
    669         assertEquals("4 key fix 3 R2 default", WIDTH * 1, params.getDefaultKeyCoordX());
    670     }
    671 
    672     //   [4] [5]
    673     // [1] <2> [3]
    674     public void testLayout5KeyFix3M0() {
    675         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_M0);
    676         assertEquals("5 key fix 3 M0 columns", 3, params.mNumColumns);
    677         assertEquals("5 key fix 3 M0 rows", 2, params.mNumRows);
    678         assertEquals("5 key fix 3 M0 left", 1, params.mLeftKeys);
    679         assertEquals("5 key fix 3 M0 right", 2, params.mRightKeys);
    680         assertEquals("5 key fix 3 M0 [1]", -1, params.getColumnPos(0));
    681         assertEquals("5 key fix 3 M0 <2>", 0, params.getColumnPos(1));
    682         assertEquals("5 key fix 3 M0 [3]", 1, params.getColumnPos(2));
    683         assertEquals("5 key fix 3 M0 [4]", 0, params.getColumnPos(3));
    684         assertEquals("5 key fix 3 M0 [5]", 1, params.getColumnPos(4));
    685         assertEquals("5 key fix 3 M0 adjust", -1, params.mTopRowAdjustment);
    686         assertEquals("5 key fix 3 M0 default", WIDTH * 1, params.getDefaultKeyCoordX());
    687     }
    688 
    689     // |[4] [5]
    690     // |<1> [2] [3]
    691     public void testLayout5KeyFix3L0() {
    692         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_L0);
    693         assertEquals("5 key fix 3 L0 columns", 3, params.mNumColumns);
    694         assertEquals("5 key fix 3 L0 rows", 2, params.mNumRows);
    695         assertEquals("5 key fix 3 L0 left", 0, params.mLeftKeys);
    696         assertEquals("5 key fix 3 L0 right", 3, params.mRightKeys);
    697         assertEquals("5 key fix 3 L0 <1>", 0, params.getColumnPos(0));
    698         assertEquals("5 key fix 3 L0 [2]", 1, params.getColumnPos(1));
    699         assertEquals("5 key fix 3 L0 [3]", 2, params.getColumnPos(2));
    700         assertEquals("5 key fix 3 L0 [4]", 0, params.getColumnPos(3));
    701         assertEquals("5 key fix 3 L0 [5]", 1, params.getColumnPos(4));
    702         assertEquals("5 key fix 3 L0 adjust", 0, params.mTopRowAdjustment);
    703         assertEquals("5 key fix 3 L0 default", WIDTH * 0, params.getDefaultKeyCoordX());
    704     }
    705 
    706     // |___ [4] [5]
    707     // |___ <1> [2] [3]
    708     public void testLayout5KeyFix3L1() {
    709         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_L1);
    710         assertEquals("5 key fix 3 L1 columns", 3, params.mNumColumns);
    711         assertEquals("5 key fix 3 L1 rows", 2, params.mNumRows);
    712         assertEquals("5 key fix 3 L1 left", 0, params.mLeftKeys);
    713         assertEquals("5 key fix 3 L1 right", 3, params.mRightKeys);
    714         assertEquals("5 key fix 3 L1 <1>", 0, params.getColumnPos(0));
    715         assertEquals("5 key fix 3 L1 [2]", 1, params.getColumnPos(1));
    716         assertEquals("5 key fix 3 L1 [3]", 2, params.getColumnPos(2));
    717         assertEquals("5 key fix 3 L1 [4]", 0, params.getColumnPos(3));
    718         assertEquals("5 key fix 3 L1 [5]", 1, params.getColumnPos(4));
    719         assertEquals("5 key fix 3 L1 adjust", 0, params.mTopRowAdjustment);
    720         assertEquals("5 key fix 3 L1 default", WIDTH * 0, params.getDefaultKeyCoordX());
    721     }
    722 
    723     // |___   [4] [5]
    724     // |___ [1] <2> [3]
    725     public void testLayout5KeyFix3L2() {
    726         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_L2);
    727         assertEquals("5 key fix 3 L2 columns", 3, params.mNumColumns);
    728         assertEquals("5 key fix 3 L2 rows", 2, params.mNumRows);
    729         assertEquals("5 key fix 3 L2 left", 1, params.mLeftKeys);
    730         assertEquals("5 key fix 3 L2 right", 2, params.mRightKeys);
    731         assertEquals("5 key fix 3 L2 [1]", -1, params.getColumnPos(0));
    732         assertEquals("5 key fix 3 L2 <2>", 0, params.getColumnPos(1));
    733         assertEquals("5 key fix 3 L2 [3]", 1, params.getColumnPos(2));
    734         assertEquals("5 key fix 3 L2 [4]", 0, params.getColumnPos(3));
    735         assertEquals("5 key fix 3 L2 [5]", 1, params.getColumnPos(4));
    736         assertEquals("5 key fix 3 L2 adjust", -1, params.mTopRowAdjustment);
    737         assertEquals("5 key fix 3 L2 default", WIDTH * 1, params.getDefaultKeyCoordX());
    738     }
    739 
    740     //     [4] [5]|
    741     // [1] [2] <3>|
    742     public void testLayout5KeyFix3R0() {
    743         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_R0);
    744         assertEquals("5 key fix 3 R0 columns", 3, params.mNumColumns);
    745         assertEquals("5 key fix 3 R0 rows", 2, params.mNumRows);
    746         assertEquals("5 key fix 3 R0 left", 2, params.mLeftKeys);
    747         assertEquals("5 key fix 3 R0 right", 1, params.mRightKeys);
    748         assertEquals("5 key fix 3 R0 [1]", -2, params.getColumnPos(0));
    749         assertEquals("5 key fix 3 R0 [2]", -1, params.getColumnPos(1));
    750         assertEquals("5 key fix 3 R0 <3>", 0, params.getColumnPos(2));
    751         assertEquals("5 key fix 3 R0 [4]", -1, params.getColumnPos(3));
    752         assertEquals("5 key fix 3 R0 [5]", 0, params.getColumnPos(4));
    753         assertEquals("5 key fix 3 R0 adjust", 0, params.mTopRowAdjustment);
    754         assertEquals("5 key fix 3 R0 default", WIDTH * 2, params.getDefaultKeyCoordX());
    755     }
    756 
    757     //     [4] [5] ___|
    758     // [1] [2] <3> ___|
    759     public void testLayout5KeyFix3R1() {
    760         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_R1);
    761         assertEquals("5 key fix 3 R1 columns", 3, params.mNumColumns);
    762         assertEquals("5 key fix 3 R1 rows", 2, params.mNumRows);
    763         assertEquals("5 key fix 3 R1 left", 2, params.mLeftKeys);
    764         assertEquals("5 key fix 3 R1 right", 1, params.mRightKeys);
    765         assertEquals("5 key fix 3 R1 [1]", -2, params.getColumnPos(0));
    766         assertEquals("5 key fix 3 R1 [2]", -1, params.getColumnPos(1));
    767         assertEquals("5 key fix 3 R1 <3>", 0, params.getColumnPos(2));
    768         assertEquals("5 key fix 3 R1 [4]", -1, params.getColumnPos(3));
    769         assertEquals("5 key fix 3 R1 [5]", 0, params.getColumnPos(4));
    770         assertEquals("5 key fix 3 R1 adjust", 0, params.mTopRowAdjustment);
    771         assertEquals("5 key fix 3 R1 default", WIDTH * 2, params.getDefaultKeyCoordX());
    772     }
    773 
    774     //   [4] [5]   ___|
    775     // [1] <2> [3] ___|
    776     public void testLayout5KeyFix3R2() {
    777         MoreKeysKeyboardParams params = createParams(5, 3, XPOS_R2);
    778         assertEquals("5 key fix 3 R2 columns", 3, params.mNumColumns);
    779         assertEquals("5 key fix 3 R2 rows", 2, params.mNumRows);
    780         assertEquals("5 key fix 3 R2 left", 1, params.mLeftKeys);
    781         assertEquals("5 key fix 3 R2 right", 2, params.mRightKeys);
    782         assertEquals("5 key fix 3 R2 [1]", -1, params.getColumnPos(0));
    783         assertEquals("5 key fix 3 R2 <2>", 0, params.getColumnPos(1));
    784         assertEquals("5 key fix 3 R2 [3]", 1, params.getColumnPos(2));
    785         assertEquals("5 key fix 3 R2 [4]", 0, params.getColumnPos(3));
    786         assertEquals("5 key fix 3 R2 [5]", 1, params.getColumnPos(4));
    787         assertEquals("5 key fix 3 R2 adjust", -1, params.mTopRowAdjustment);
    788         assertEquals("5 key fix 3 R2 default", WIDTH * 1, params.getDefaultKeyCoordX());
    789     }
    790 
    791     // [4] [5] [6]
    792     // [1] <2> [3]
    793     public void testLayout6KeyFix3M0() {
    794         MoreKeysKeyboardParams params = createParams(6, 3, XPOS_M0);
    795         assertEquals("6 key fix 3 M0 columns", 3, params.mNumColumns);
    796         assertEquals("6 key fix 3 M0 rows", 2, params.mNumRows);
    797         assertEquals("6 key fix 3 M0 left", 1, params.mLeftKeys);
    798         assertEquals("6 key fix 3 M0 right", 2, params.mRightKeys);
    799         assertEquals("6 key fix 3 M0 [1]", -1, params.getColumnPos(0));
    800         assertEquals("6 key fix 3 M0 <2>", 0, params.getColumnPos(1));
    801         assertEquals("6 key fix 3 M0 [3]", 1, params.getColumnPos(2));
    802         assertEquals("6 key fix 3 M0 [4]", -1, params.getColumnPos(3));
    803         assertEquals("6 key fix 3 M0 [5]", 0, params.getColumnPos(4));
    804         assertEquals("6 key fix 3 M0 [6]", 1, params.getColumnPos(5));
    805         assertEquals("6 key fix 3 M0 adjust", 0, params.mTopRowAdjustment);
    806         assertEquals("6 key fix 3 M0 default", WIDTH * 1, params.getDefaultKeyCoordX());
    807     }
    808 
    809     // |[4] [5] [6]
    810     // |<1> [2] [3]
    811     public void testLayout6KeyFix3L0() {
    812         MoreKeysKeyboardParams params = createParams(6, 3, XPOS_L0);
    813         assertEquals("6 key fix 3 L0 columns", 3, params.mNumColumns);
    814         assertEquals("6 key fix 3 L0 rows", 2, params.mNumRows);
    815         assertEquals("6 key fix 3 L0 left", 0, params.mLeftKeys);
    816         assertEquals("6 key fix 3 L0 right", 3, params.mRightKeys);
    817         assertEquals("6 key fix 3 L0 <1>", 0, params.getColumnPos(0));
    818         assertEquals("6 key fix 3 L0 [2]", 1, params.getColumnPos(1));
    819         assertEquals("6 key fix 3 L0 [3]", 2, params.getColumnPos(2));
    820         assertEquals("6 key fix 3 L0 [4]", 0, params.getColumnPos(3));
    821         assertEquals("6 key fix 3 L0 [5]", 1, params.getColumnPos(4));
    822         assertEquals("6 key fix 3 L0 [6]", 2, params.getColumnPos(5));
    823         assertEquals("6 key fix 3 L0 adjust", 0, params.mTopRowAdjustment);
    824         assertEquals("6 key fix 3 L0 default", WIDTH * 0, params.getDefaultKeyCoordX());
    825     }
    826 
    827     // |___ [4] [5] [6]
    828     // |___ <1> [2] [3]
    829     public void testLayout6KeyFix3L1() {
    830         MoreKeysKeyboardParams params = createParams(6, 3, XPOS_L1);
    831         assertEquals("6 key fix 3 L1 columns", 3, params.mNumColumns);
    832         assertEquals("6 key fix 3 L1 rows", 2, params.mNumRows);
    833         assertEquals("6 key fix 3 L1 left", 0, params.mLeftKeys);
    834         assertEquals("6 key fix 3 L1 right", 3, params.mRightKeys);
    835         assertEquals("6 key fix 3 L1 <1>", 0, params.getColumnPos(0));
    836         assertEquals("6 key fix 3 L1 [2]", 1, params.getColumnPos(1));
    837         assertEquals("6 key fix 3 L1 [3]", 2, params.getColumnPos(2));
    838         assertEquals("6 key fix 3 L1 [4]", 0, params.getColumnPos(3));
    839         assertEquals("6 key fix 3 L1 [5]", 1, params.getColumnPos(4));
    840         assertEquals("6 key fix 3 L1 [6]", 2, params.getColumnPos(5));
    841         assertEquals("6 key fix 3 L1 adjust", 0, params.mTopRowAdjustment);
    842         assertEquals("6 key fix 3 L1 default", WIDTH * 0, params.getDefaultKeyCoordX());
    843     }
    844 
    845     // |___ [4] [5] [6]
    846     // |___ [1] <2> [3]
    847     public void testLayout6KeyFix3L2() {
    848         MoreKeysKeyboardParams params = createParams(6, 3, XPOS_L2);
    849         assertEquals("6 key fix 3 L2 columns", 3, params.mNumColumns);
    850         assertEquals("6 key fix 3 L2 rows", 2, params.mNumRows);
    851         assertEquals("6 key fix 3 L2 left", 1, params.mLeftKeys);
    852         assertEquals("6 key fix 3 L2 right", 2, params.mRightKeys);
    853         assertEquals("6 key fix 3 L2 [1]", -1, params.getColumnPos(0));
    854         assertEquals("6 key fix 3 L2 <2>", 0, params.getColumnPos(1));
    855         assertEquals("6 key fix 3 L2 [3]", 1, params.getColumnPos(2));
    856         assertEquals("6 key fix 3 L2 [4]", -1, params.getColumnPos(3));
    857         assertEquals("6 key fix 3 L2 [5]", 0, params.getColumnPos(4));
    858         assertEquals("6 key fix 3 L2 [6]", 1, params.getColumnPos(5));
    859         assertEquals("6 key fix 3 L2 adjust", 0, params.mTopRowAdjustment);
    860         assertEquals("6 key fix 3 L2 default", WIDTH * 1, params.getDefaultKeyCoordX());
    861     }
    862 
    863     // [4] [5] [6]|
    864     // [1] [2] <3>|
    865     public void testLayout6KeyFix3R0() {
    866         MoreKeysKeyboardParams params = createParams(6, 3, XPOS_R0);
    867         assertEquals("6 key fix 3 R0 columns", 3, params.mNumColumns);
    868         assertEquals("6 key fix 3 R0 rows", 2, params.mNumRows);
    869         assertEquals("6 key fix 3 R0 left", 2, params.mLeftKeys);
    870         assertEquals("6 key fix 3 R0 right", 1, params.mRightKeys);
    871         assertEquals("6 key fix 3 R0 [1]", -2, params.getColumnPos(0));
    872         assertEquals("6 key fix 3 R0 [2]", -1, params.getColumnPos(1));
    873         assertEquals("6 key fix 3 R0 <3>", 0, params.getColumnPos(2));
    874         assertEquals("6 key fix 3 R0 [4]", -2, params.getColumnPos(3));
    875         assertEquals("6 key fix 3 R0 [5]", -1, params.getColumnPos(4));
    876         assertEquals("6 key fix 3 R0 [6]", 0, params.getColumnPos(5));
    877         assertEquals("6 key fix 3 R0 adjust", 0, params.mTopRowAdjustment);
    878         assertEquals("6 key fix 3 R0 default", WIDTH * 2, params.getDefaultKeyCoordX());
    879     }
    880 
    881     // [4] [5] [6] ___|
    882     // [1] [2] <3> ___|
    883     public void testLayout6KeyFix3R1() {
    884         MoreKeysKeyboardParams params = createParams(6, 3, XPOS_R1);
    885         assertEquals("6 key fix 3 R1 columns", 3, params.mNumColumns);
    886         assertEquals("6 key fix 3 R1 rows", 2, params.mNumRows);
    887         assertEquals("6 key fix 3 R1 left", 2, params.mLeftKeys);
    888         assertEquals("6 key fix 3 R1 right", 1, params.mRightKeys);
    889         assertEquals("6 key fix 3 R1 [1]", -2, params.getColumnPos(0));
    890         assertEquals("6 key fix 3 R1 [2]", -1, params.getColumnPos(1));
    891         assertEquals("6 key fix 3 R1 <3>", 0, params.getColumnPos(2));
    892         assertEquals("6 key fix 3 R1 [4]", -2, params.getColumnPos(3));
    893         assertEquals("6 key fix 3 R1 [5]", -1, params.getColumnPos(4));
    894         assertEquals("6 key fix 3 R1 [6]", 0, params.getColumnPos(5));
    895         assertEquals("6 key fix 3 R1 adjust", 0, params.mTopRowAdjustment);
    896         assertEquals("6 key fix 3 R1 default", WIDTH * 2, params.getDefaultKeyCoordX());
    897     }
    898 
    899     // [4] [5] [6] ___|
    900     // [1] <2> [3] ___|
    901     public void testLayout6KeyFix3R2() {
    902         MoreKeysKeyboardParams params = createParams(6, 3, XPOS_R2);
    903         assertEquals("6 key fix 3 R2 columns", 3, params.mNumColumns);
    904         assertEquals("6 key fix 3 R2 rows", 2, params.mNumRows);
    905         assertEquals("6 key fix 3 R2 left", 1, params.mLeftKeys);
    906         assertEquals("6 key fix 3 R2 right", 2, params.mRightKeys);
    907         assertEquals("6 key fix 3 R2 [1]", -1, params.getColumnPos(0));
    908         assertEquals("6 key fix 3 R2 <2>", 0, params.getColumnPos(1));
    909         assertEquals("6 key fix 3 R2 [1]", 1, params.getColumnPos(2));
    910         assertEquals("6 key fix 3 R2 [4]", -1, params.getColumnPos(3));
    911         assertEquals("6 key fix 3 R2 [5]", 0, params.getColumnPos(4));
    912         assertEquals("6 key fix 3 R2 [6]", 1, params.getColumnPos(5));
    913         assertEquals("6 key fix 3 R2 adjust", 0, params.mTopRowAdjustment);
    914         assertEquals("6 key fix 3 R2 default", WIDTH * 1, params.getDefaultKeyCoordX());
    915     }
    916 
    917     // <1> [2] [3] [4]
    918     public void testLayout4KeyFix5M0() {
    919         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_M0);
    920         assertEquals("4 key fix 5 columns", 4, params.mNumColumns);
    921         assertEquals("4 key fix 5 rows", 1, params.mNumRows);
    922         assertEquals("4 key fix 5 left", 1, params.mLeftKeys);
    923         assertEquals("4 key fix 5 right", 3, params.mRightKeys);
    924         assertEquals("4 key fix 5 <1>", -1, params.getColumnPos(0));
    925         assertEquals("4 key fix 5 [2]", 0, params.getColumnPos(1));
    926         assertEquals("4 key fix 5 [3]", 1, params.getColumnPos(2));
    927         assertEquals("4 key fix 5 [4]", 2, params.getColumnPos(3));
    928         assertEquals("4 key fix 5 adjust", 0, params.mTopRowAdjustment);
    929         assertEquals("4 key fix 5 default", WIDTH * 1, params.getDefaultKeyCoordX());
    930     }
    931 
    932     // |<1> [2] [3] [4]
    933     public void testLayout4KeyFix5L0() {
    934         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_L0);
    935         assertEquals("4 key fix 5 L0 columns", 4, params.mNumColumns);
    936         assertEquals("4 key fix 5 L0 rows", 1, params.mNumRows);
    937         assertEquals("4 key fix 5 L0 left", 0, params.mLeftKeys);
    938         assertEquals("4 key fix 5 L0 right", 4, params.mRightKeys);
    939         assertEquals("4 key fix 5 L0 <1>", 0, params.getColumnPos(0));
    940         assertEquals("4 key fix 5 L0 [2]", 1, params.getColumnPos(1));
    941         assertEquals("4 key fix 5 L0 [3]", 2, params.getColumnPos(2));
    942         assertEquals("4 key fix 5 L0 [4]", 3, params.getColumnPos(3));
    943         assertEquals("4 key fix 5 L0 adjust", 0, params.mTopRowAdjustment);
    944         assertEquals("4 key fix 5 L0 default", WIDTH * 0, params.getDefaultKeyCoordX());
    945     }
    946 
    947     // |___ <1> [2] [3] [4]
    948     public void testLayout4KeyFix5L1() {
    949         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_L1);
    950         assertEquals("4 key fix 5 L1 columns", 4, params.mNumColumns);
    951         assertEquals("4 key fix 5 L1 rows", 1, params.mNumRows);
    952         assertEquals("4 key fix 5 L1 left", 0, params.mLeftKeys);
    953         assertEquals("4 key fix 5 L1 right", 4, params.mRightKeys);
    954         assertEquals("4 key fix 5 L1 <1>", 0, params.getColumnPos(0));
    955         assertEquals("4 key fix 5 L1 [2]", 1, params.getColumnPos(1));
    956         assertEquals("4 key fix 5 L1 [3]", 2, params.getColumnPos(2));
    957         assertEquals("4 key fix 5 L1 [4]", 3, params.getColumnPos(3));
    958         assertEquals("4 key fix 5 L1 adjust", 0, params.mTopRowAdjustment);
    959         assertEquals("4 key fix 5 L1 default", WIDTH * 0, params.getDefaultKeyCoordX());
    960     }
    961 
    962     // |___ [1] <2> [3] [4]
    963     public void testLayout4KeyFix5L2() {
    964         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_L2);
    965         assertEquals("4 key fix 5 L2 columns", 4, params.mNumColumns);
    966         assertEquals("4 key fix 5 L2 rows", 1, params.mNumRows);
    967         assertEquals("4 key fix 5 L2 left", 1, params.mLeftKeys);
    968         assertEquals("4 key fix 5 L2 right", 3, params.mRightKeys);
    969         assertEquals("4 key fix 5 L2 [1]", -1, params.getColumnPos(0));
    970         assertEquals("4 key fix 5 L2 <2>", 0, params.getColumnPos(1));
    971         assertEquals("4 key fix 5 L2 [3]", 1, params.getColumnPos(2));
    972         assertEquals("4 key fix 5 L2 [4]", 2, params.getColumnPos(3));
    973         assertEquals("4 key fix 5 L2 adjust", 0, params.mTopRowAdjustment);
    974         assertEquals("4 key fix 5 L2 default", WIDTH * 1, params.getDefaultKeyCoordX());
    975     }
    976 
    977     // [1] [2] [3] <4>|
    978     public void testLayout4KeyFix5R0() {
    979         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_R0);
    980         assertEquals("4 key fix 5 R0 columns", 4, params.mNumColumns);
    981         assertEquals("4 key fix 5 R0 rows", 1, params.mNumRows);
    982         assertEquals("4 key fix 5 R0 left", 3, params.mLeftKeys);
    983         assertEquals("4 key fix 5 R0 right", 1, params.mRightKeys);
    984         assertEquals("4 key fix 5 R0 [1]", -3, params.getColumnPos(0));
    985         assertEquals("4 key fix 5 R0 [2]", -2, params.getColumnPos(1));
    986         assertEquals("4 key fix 5 R0 [3]", -1, params.getColumnPos(2));
    987         assertEquals("4 key fix 5 R0 <4>", 0, params.getColumnPos(3));
    988         assertEquals("4 key fix 5 R0 adjust", 0, params.mTopRowAdjustment);
    989         assertEquals("4 key fix 5 R0 default", WIDTH * 3, params.getDefaultKeyCoordX());
    990     }
    991 
    992     // [1] [2] [3] <4> ___|
    993     public void testLayout4KeyFix5R1() {
    994         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_R1);
    995         assertEquals("4 key fix 5 R1 columns", 4, params.mNumColumns);
    996         assertEquals("4 key fix 5 R1 rows", 1, params.mNumRows);
    997         assertEquals("4 key fix 5 R1 left", 3, params.mLeftKeys);
    998         assertEquals("4 key fix 5 R1 right", 1, params.mRightKeys);
    999         assertEquals("4 key fix 5 R1 [1]", -3, params.getColumnPos(0));
   1000         assertEquals("4 key fix 5 R1 [2]", -2, params.getColumnPos(1));
   1001         assertEquals("4 key fix 5 R1 [3]", -1, params.getColumnPos(2));
   1002         assertEquals("4 key fix 5 R1 <4>", 0, params.getColumnPos(3));
   1003         assertEquals("4 key fix 5 R1 adjust", 0, params.mTopRowAdjustment);
   1004         assertEquals("4 key fix 5 R1 default", WIDTH * 3, params.getDefaultKeyCoordX());
   1005     }
   1006 
   1007     // [1] [2] <3> [4] ___|
   1008     public void testLayout4KeyFix5R2() {
   1009         MoreKeysKeyboardParams params = createParams(4, 5, XPOS_R2);
   1010         assertEquals("4 key fix 5 R2 columns", 4, params.mNumColumns);
   1011         assertEquals("4 key fix 5 R2 rows", 1, params.mNumRows);
   1012         assertEquals("4 key fix 5 R2 left", 2, params.mLeftKeys);
   1013         assertEquals("4 key fix 5 R2 right", 2, params.mRightKeys);
   1014         assertEquals("4 key fix 5 R2 [1]", -2, params.getColumnPos(0));
   1015         assertEquals("4 key fix 5 R2 [2]", -1, params.getColumnPos(1));
   1016         assertEquals("4 key fix 5 R2 <3>", 0, params.getColumnPos(2));
   1017         assertEquals("4 key fix 5 R2 [4]", 1, params.getColumnPos(3));
   1018         assertEquals("4 key fix 5 R2 adjust", 0, params.mTopRowAdjustment);
   1019         assertEquals("4 key fix 5 R2 default", WIDTH * 2, params.getDefaultKeyCoordX());
   1020     }
   1021 
   1022     //     [5]
   1023     // [1] <2> [3] [4]
   1024     public void testLayout5KeyFix4M0() {
   1025         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_M0);
   1026         assertEquals("5 key fix 4 M0 columns", 4, params.mNumColumns);
   1027         assertEquals("5 key fix 4 M0 rows", 2, params.mNumRows);
   1028         assertEquals("5 key fix 4 M0 left", 1, params.mLeftKeys);
   1029         assertEquals("5 key fix 4 M0 right", 3, params.mRightKeys);
   1030         assertEquals("5 key fix 4 M0 [1]", -1, params.getColumnPos(0));
   1031         assertEquals("5 key fix 4 M0 <2>", 0, params.getColumnPos(1));
   1032         assertEquals("5 key fix 4 M0 [3]", 1, params.getColumnPos(2));
   1033         assertEquals("5 key fix 4 M0 [4]", 2, params.getColumnPos(3));
   1034         assertEquals("5 key fix 4 M0 [5]", 0, params.getColumnPos(4));
   1035         assertEquals("5 key fix 4 M0 adjust", 0, params.mTopRowAdjustment);
   1036         assertEquals("5 key fix 4 M0 default", WIDTH * 1, params.getDefaultKeyCoordX());
   1037     }
   1038 
   1039     // |[5]
   1040     // |<1> [2] [3] [4]
   1041     public void testLayout5KeyFix4L0() {
   1042         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_L0);
   1043         assertEquals("5 key fix 4 L0 columns", 4, params.mNumColumns);
   1044         assertEquals("5 key fix 4 L0 rows", 2, params.mNumRows);
   1045         assertEquals("5 key fix 4 L0 left", 0, params.mLeftKeys);
   1046         assertEquals("5 key fix 4 L0 right", 4, params.mRightKeys);
   1047         assertEquals("5 key fix 4 L0 <1>", 0, params.getColumnPos(0));
   1048         assertEquals("5 key fix 4 L0 [2]", 1, params.getColumnPos(1));
   1049         assertEquals("5 key fix 4 L0 [3]", 2, params.getColumnPos(2));
   1050         assertEquals("5 key fix 4 L0 [4]", 3, params.getColumnPos(3));
   1051         assertEquals("5 key fix 4 L0 [5]", 0, params.getColumnPos(4));
   1052         assertEquals("5 key fix 4 L0 adjust", 0, params.mTopRowAdjustment);
   1053         assertEquals("5 key fix 4 L0 default", WIDTH * 0, params.getDefaultKeyCoordX());
   1054     }
   1055 
   1056     // |___ [5]
   1057     // |___ <1> [2] [3] [4]
   1058     public void testLayout5KeyFix4L1() {
   1059         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_L1);
   1060         assertEquals("5 key fix 4 L1 columns", 4, params.mNumColumns);
   1061         assertEquals("5 key fix 4 L1 rows", 2, params.mNumRows);
   1062         assertEquals("5 key fix 4 L1 left", 0, params.mLeftKeys);
   1063         assertEquals("5 key fix 4 L1 right", 4, params.mRightKeys);
   1064         assertEquals("5 key fix 4 L1 <1>", 0, params.getColumnPos(0));
   1065         assertEquals("5 key fix 4 L1 [2]", 1, params.getColumnPos(1));
   1066         assertEquals("5 key fix 4 L1 [3]", 2, params.getColumnPos(2));
   1067         assertEquals("5 key fix 4 L1 [4]", 3, params.getColumnPos(3));
   1068         assertEquals("5 key fix 4 L1 [5]", 0, params.getColumnPos(4));
   1069         assertEquals("5 key fix 4 L1 adjust", 0, params.mTopRowAdjustment);
   1070         assertEquals("5 key fix 4 L1 default", WIDTH * 0, params.getDefaultKeyCoordX());
   1071     }
   1072 
   1073     // |___     [5]
   1074     // |___ [1] <2> [3] [4]
   1075     public void testLayout5KeyFix4L2() {
   1076         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_L2);
   1077         assertEquals("5 key fix 4 L2 columns", 4, params.mNumColumns);
   1078         assertEquals("5 key fix 4 L2 rows", 2, params.mNumRows);
   1079         assertEquals("5 key fix 4 L2 left", 1, params.mLeftKeys);
   1080         assertEquals("5 key fix 4 L2 right", 3, params.mRightKeys);
   1081         assertEquals("5 key fix 4 L2 [1]", -1, params.getColumnPos(0));
   1082         assertEquals("5 key fix 4 L2 <2>", 0, params.getColumnPos(1));
   1083         assertEquals("5 key fix 4 L2 [3]", 1, params.getColumnPos(2));
   1084         assertEquals("5 key fix 4 L2 [4]", 2, params.getColumnPos(3));
   1085         assertEquals("5 key fix 4 L2 [5]", 0, params.getColumnPos(4));
   1086         assertEquals("5 key fix 4 L2 adjust", 0, params.mTopRowAdjustment);
   1087         assertEquals("5 key fix 4 L2 default", WIDTH * 1, params.getDefaultKeyCoordX());
   1088     }
   1089 
   1090     //             [5]|
   1091     // [1] [2] [3] <4>|
   1092     public void testLayout5KeyFix4R0() {
   1093         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_R0);
   1094         assertEquals("5 key fix 4 R0 columns", 4, params.mNumColumns);
   1095         assertEquals("5 key fix 4 R0 rows", 2, params.mNumRows);
   1096         assertEquals("5 key fix 4 R0 left", 3, params.mLeftKeys);
   1097         assertEquals("5 key fix 4 R0 right", 1, params.mRightKeys);
   1098         assertEquals("5 key fix 4 R0 [1]", -3, params.getColumnPos(0));
   1099         assertEquals("5 key fix 4 R0 [2]", -2, params.getColumnPos(1));
   1100         assertEquals("5 key fix 4 R0 [3]", -1, params.getColumnPos(2));
   1101         assertEquals("5 key fix 4 R0 <4>", 0, params.getColumnPos(3));
   1102         assertEquals("5 key fix 4 R0 [5]", 0, params.getColumnPos(4));
   1103         assertEquals("5 key fix 4 R0 adjust", 0, params.mTopRowAdjustment);
   1104         assertEquals("5 key fix 4 R0 default", WIDTH * 3, params.getDefaultKeyCoordX());
   1105     }
   1106 
   1107     //             [5] ___|
   1108     // [1] [2] [3] <4> ___|
   1109     public void testLayout5KeyFix4R1() {
   1110         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_R1);
   1111         assertEquals("5 key fix 4 R1 columns", 4, params.mNumColumns);
   1112         assertEquals("5 key fix 4 R1 rows", 2, params.mNumRows);
   1113         assertEquals("5 key fix 4 R1 left", 3, params.mLeftKeys);
   1114         assertEquals("5 key fix 4 R1 right", 1, params.mRightKeys);
   1115         assertEquals("5 key fix 4 R1 [1]", -3, params.getColumnPos(0));
   1116         assertEquals("5 key fix 4 R1 [2]", -2, params.getColumnPos(1));
   1117         assertEquals("5 key fix 4 R1 [3]", -1, params.getColumnPos(2));
   1118         assertEquals("5 key fix 4 R1 [4]", 0, params.getColumnPos(3));
   1119         assertEquals("5 key fix 4 R1 [5]", 0, params.getColumnPos(4));
   1120         assertEquals("5 key fix 4 R1 adjust", 0, params.mTopRowAdjustment);
   1121         assertEquals("5 key fix 4 R1 default", WIDTH * 3, params.getDefaultKeyCoordX());
   1122     }
   1123 
   1124     //         [5]     ___|
   1125     // [1] [2] <3> [4] ___|
   1126     public void testLayout5KeyFix4R2() {
   1127         MoreKeysKeyboardParams params = createParams(5, 4, XPOS_R2);
   1128         assertEquals("5 key fix 4 R2 columns", 4, params.mNumColumns);
   1129         assertEquals("5 key fix 4 R2 rows", 2, params.mNumRows);
   1130         assertEquals("5 key fix 4 R2 left", 2, params.mLeftKeys);
   1131         assertEquals("5 key fix 4 R2 right", 2, params.mRightKeys);
   1132         assertEquals("5 key fix 4 R2 [1]", -2, params.getColumnPos(0));
   1133         assertEquals("5 key fix 4 R2 [2]", -1, params.getColumnPos(1));
   1134         assertEquals("5 key fix 4 R2 <3>", 0, params.getColumnPos(2));
   1135         assertEquals("5 key fix 4 R2 [4]", 1, params.getColumnPos(3));
   1136         assertEquals("5 key fix 4 R2 [5]", 0, params.getColumnPos(4));
   1137         assertEquals("5 key fix 4 R2 adjust", 0, params.mTopRowAdjustment);
   1138         assertEquals("5 key fix 4 R2 default", WIDTH * 2, params.getDefaultKeyCoordX());
   1139     }
   1140 
   1141     //   [5] [6]
   1142     // [1] <2> [3] [4]
   1143     public void testLayout6KeyFix4M0() {
   1144         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_M0);
   1145         assertEquals("6 key fix 4 M0 columns", 4, params.mNumColumns);
   1146         assertEquals("6 key fix 4 M0 rows", 2, params.mNumRows);
   1147         assertEquals("6 key fix 4 M0 left", 1, params.mLeftKeys);
   1148         assertEquals("6 key fix 4 M0 right", 3, params.mRightKeys);
   1149         assertEquals("6 key fix 4 M0 [1]", -1, params.getColumnPos(0));
   1150         assertEquals("6 key fix 4 M0 <2>", 0, params.getColumnPos(1));
   1151         assertEquals("6 key fix 4 M0 [3]", 1, params.getColumnPos(2));
   1152         assertEquals("6 key fix 4 M0 [4]", 2, params.getColumnPos(3));
   1153         assertEquals("6 key fix 4 M0 [5]", 0, params.getColumnPos(4));
   1154         assertEquals("6 key fix 4 M0 [6]", 1, params.getColumnPos(5));
   1155         assertEquals("6 key fix 4 M0 adjust", -1, params.mTopRowAdjustment);
   1156         assertEquals("6 key fix 4 M0 default", WIDTH * 1, params.getDefaultKeyCoordX());
   1157     }
   1158 
   1159     // |[5] [6]
   1160     // |<1> [2] [3] [4]
   1161     public void testLayout6KeyFix4L0() {
   1162         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_L0);
   1163         assertEquals("6 key fix 4 L0 columns", 4, params.mNumColumns);
   1164         assertEquals("6 key fix 4 L0 rows", 2, params.mNumRows);
   1165         assertEquals("6 key fix 4 L0 left", 0, params.mLeftKeys);
   1166         assertEquals("6 key fix 4 L0 right", 4, params.mRightKeys);
   1167         assertEquals("6 key fix 4 L0 <1>", 0, params.getColumnPos(0));
   1168         assertEquals("6 key fix 4 L0 [2]", 1, params.getColumnPos(1));
   1169         assertEquals("6 key fix 4 L0 [3]", 2, params.getColumnPos(2));
   1170         assertEquals("6 key fix 4 L0 [4]", 3, params.getColumnPos(3));
   1171         assertEquals("6 key fix 4 L0 [5]", 0, params.getColumnPos(4));
   1172         assertEquals("6 key fix 4 L0 [6]", 1, params.getColumnPos(5));
   1173         assertEquals("6 key fix 4 L0 adjust", 0, params.mTopRowAdjustment);
   1174         assertEquals("6 key fix 4 L0 default", WIDTH * 0, params.getDefaultKeyCoordX());
   1175     }
   1176 
   1177     // |___ [5] [6]
   1178     // |___ <1> [2] [3] [4]
   1179     public void testLayout6KeyFix4L1() {
   1180         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_L1);
   1181         assertEquals("6 key fix 4 L1 columns", 4, params.mNumColumns);
   1182         assertEquals("6 key fix 4 L1 rows", 2, params.mNumRows);
   1183         assertEquals("6 key fix 4 L1 left", 0, params.mLeftKeys);
   1184         assertEquals("6 key fix 4 L1 right", 4, params.mRightKeys);
   1185         assertEquals("6 key fix 4 L1 <1>", 0, params.getColumnPos(0));
   1186         assertEquals("6 key fix 4 L1 [2]", 1, params.getColumnPos(1));
   1187         assertEquals("6 key fix 4 L1 [3]", 2, params.getColumnPos(2));
   1188         assertEquals("6 key fix 4 L1 [4]", 3, params.getColumnPos(3));
   1189         assertEquals("6 key fix 4 L1 [5]", 0, params.getColumnPos(4));
   1190         assertEquals("6 key fix 4 L1 [6]", 1, params.getColumnPos(5));
   1191         assertEquals("6 key fix 4 L1 adjust", 0, params.mTopRowAdjustment);
   1192         assertEquals("6 key fix 4 L1 default", WIDTH * 0, params.getDefaultKeyCoordX());
   1193     }
   1194 
   1195     // |___   [5] [6]
   1196     // |___ [1] <2> [3] [4]
   1197     public void testLayout6KeyFix4L2() {
   1198         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_L2);
   1199         assertEquals("6 key fix 4 L2 columns", 4, params.mNumColumns);
   1200         assertEquals("6 key fix 4 L2 rows", 2, params.mNumRows);
   1201         assertEquals("6 key fix 4 L2 left", 1, params.mLeftKeys);
   1202         assertEquals("6 key fix 4 L2 right", 3, params.mRightKeys);
   1203         assertEquals("6 key fix 4 L2 [1]", -1, params.getColumnPos(0));
   1204         assertEquals("6 key fix 4 L2 <2>", 0, params.getColumnPos(1));
   1205         assertEquals("6 key fix 4 L2 [3]", 1, params.getColumnPos(2));
   1206         assertEquals("6 key fix 4 L2 [4]", 2, params.getColumnPos(3));
   1207         assertEquals("6 key fix 4 L2 [5]", 0, params.getColumnPos(4));
   1208         assertEquals("6 key fix 4 L2 [6]", 1, params.getColumnPos(5));
   1209         assertEquals("6 key fix 4 L2 adjust", -1, params.mTopRowAdjustment);
   1210         assertEquals("6 key fix 4 L2 default", WIDTH * 1, params.getDefaultKeyCoordX());
   1211     }
   1212 
   1213     //         [5] [6]|
   1214     // [1] [2] [3] <4>|
   1215     public void testLayout6KeyFix4R0() {
   1216         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_R0);
   1217         assertEquals("6 key fix 4 R0 columns", 4, params.mNumColumns);
   1218         assertEquals("6 key fix 4 R0 rows", 2, params.mNumRows);
   1219         assertEquals("6 key fix 4 R0 left", 3, params.mLeftKeys);
   1220         assertEquals("6 key fix 4 R0 right", 1, params.mRightKeys);
   1221         assertEquals("6 key fix 4 R0 [1]", -3, params.getColumnPos(0));
   1222         assertEquals("6 key fix 4 R0 [2]", -2, params.getColumnPos(1));
   1223         assertEquals("6 key fix 4 R0 [3]", -1, params.getColumnPos(2));
   1224         assertEquals("6 key fix 4 R0 <4>", 0, params.getColumnPos(3));
   1225         assertEquals("6 key fix 4 R0 [5]", -1, params.getColumnPos(4));
   1226         assertEquals("6 key fix 4 R0 [6]", 0, params.getColumnPos(5));
   1227         assertEquals("6 key fix 4 R0 adjust", 0, params.mTopRowAdjustment);
   1228         assertEquals("6 key fix 4 R0 default", WIDTH * 3, params.getDefaultKeyCoordX());
   1229     }
   1230 
   1231     //         [5] [6] ___|
   1232     // [1] [2] [3] <4> ___|
   1233     public void testLayout6KeyFix4R1() {
   1234         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_R1);
   1235         assertEquals("6 key fix 4 R1 columns", 4, params.mNumColumns);
   1236         assertEquals("6 key fix 4 R1 rows", 2, params.mNumRows);
   1237         assertEquals("6 key fix 4 R1 left", 3, params.mLeftKeys);
   1238         assertEquals("6 key fix 4 R1 right", 1, params.mRightKeys);
   1239         assertEquals("6 key fix 4 R1 [1]", -3, params.getColumnPos(0));
   1240         assertEquals("6 key fix 4 R1 [2]", -2, params.getColumnPos(1));
   1241         assertEquals("6 key fix 4 R1 [3]", -1, params.getColumnPos(2));
   1242         assertEquals("6 key fix 4 R1 [4]", 0, params.getColumnPos(3));
   1243         assertEquals("6 key fix 4 R1 [5]", -1, params.getColumnPos(4));
   1244         assertEquals("6 key fix 4 R1 [6]", 0, params.getColumnPos(5));
   1245         assertEquals("6 key fix 4 R1 adjust", 0, params.mTopRowAdjustment);
   1246         assertEquals("6 key fix 4 R1 default", WIDTH * 3, params.getDefaultKeyCoordX());
   1247     }
   1248 
   1249     //       [5] [6]   ___|
   1250     // [1] [2] <3> [4] ___|
   1251     public void testLayout6KeyFix4R2() {
   1252         MoreKeysKeyboardParams params = createParams(6, 4, XPOS_R2);
   1253         assertEquals("6 key fix 4 R2 columns", 4, params.mNumColumns);
   1254         assertEquals("6 key fix 4 R2 rows", 2, params.mNumRows);
   1255         assertEquals("6 key fix 4 R2 left", 2, params.mLeftKeys);
   1256         assertEquals("6 key fix 4 R2 right", 2, params.mRightKeys);
   1257         assertEquals("6 key fix 4 R2 [1]", -2, params.getColumnPos(0));
   1258         assertEquals("6 key fix 4 R2 [2]", -1, params.getColumnPos(1));
   1259         assertEquals("6 key fix 4 R2 <3>", 0, params.getColumnPos(2));
   1260         assertEquals("6 key fix 4 R2 [4]", 1, params.getColumnPos(3));
   1261         assertEquals("6 key fix 4 R2 [5]", 0, params.getColumnPos(4));
   1262         assertEquals("6 key fix 4 R2 [6]", 1, params.getColumnPos(5));
   1263         assertEquals("6 key fix 4 R2 adjust", -1, params.mTopRowAdjustment);
   1264         assertEquals("6 key fix 4 R2 default", WIDTH * 2, params.getDefaultKeyCoordX());
   1265     }
   1266 
   1267     // [5] [6] [7]
   1268     // [1] <2> [3] [4]
   1269     public void testLayout7KeyFix4M0() {
   1270         MoreKeysKeyboardParams params = createParams(7, 4, XPOS_M0);
   1271         assertEquals("7 key fix 4 M0 columns", 4, params.mNumColumns);
   1272         assertEquals("7 key fix 4 M0 rows", 2, params.mNumRows);
   1273         assertEquals("7 key fix 4 M0 left", 1, params.mLeftKeys);
   1274         assertEquals("7 key fix 4 M0 right", 3, params.mRightKeys);
   1275         assertEquals("7 key fix 4 M0 [1]", -1, params.getColumnPos(0));
   1276         assertEquals("7 key fix 4 M0 <2>", 0, params.getColumnPos(1));
   1277         assertEquals("7 key fix 4 M0 [3]", 1, params.getColumnPos(2));
   1278         assertEquals("7 key fix 4 M0 [4]", 2, params.getColumnPos(3));
   1279         assertEquals("7 key fix 4 M0 [5]", -1, params.getColumnPos(4));
   1280         assertEquals("7 key fix 4 M0 [6]", 0, params.getColumnPos(5));
   1281         assertEquals("7 key fix 4 M0 [7]", 1, params.getColumnPos(6));
   1282         assertEquals("7 key fix 4 M0 adjust", 0, params.mTopRowAdjustment);
   1283         assertEquals("7 key fix 4 M0 default", WIDTH * 1, params.getDefaultKeyCoordX());
   1284     }
   1285 
   1286     // |[5] [6] [7]
   1287     // |<1> [2] [3] [4]
   1288     public void testLayout7KeyFix4L0() {
   1289         MoreKeysKeyboardParams params = createParams(7, 4, XPOS_L0);
   1290         assertEquals("7 key fix 4 L0 columns", 4, params.mNumColumns);
   1291         assertEquals("7 key fix 4 L0 rows", 2, params.mNumRows);
   1292         assertEquals("7 key fix 4 L0 left", 0, params.mLeftKeys);
   1293         assertEquals("7 key fix 4 L0 right", 4, params.mRightKeys);
   1294         assertEquals("7 key fix 4 L0 <1>", 0, params.getColumnPos(0));
   1295         assertEquals("7 key fix 4 L0 [2]", 1, params.getColumnPos(1));
   1296         assertEquals("7 key fix 4 L0 [3]", 2, params.getColumnPos(2));
   1297         assertEquals("7 key fix 4 L0 [4]", 3, params.getColumnPos(3));
   1298         assertEquals("7 key fix 4 L0 [5]", 0, params.getColumnPos(4));
   1299         assertEquals("7 key fix 4 L0 [6]", 1, params.getColumnPos(5));
   1300         assertEquals("7 key fix 4 L0 [7]", 2, params.getColumnPos(6));
   1301         assertEquals("7 key fix 4 L0 adjust", 0, params.mTopRowAdjustment);
   1302         assertEquals("7 key fix 4 L0 default", WIDTH * 0, params.getDefaultKeyCoordX());
   1303     }
   1304 
   1305     // |___ [5] [6] [7]
   1306     // |___ <1> [2] [3] [4]
   1307     public void testLayout7KeyFix4L1() {
   1308         MoreKeysKeyboardParams params = createParams(7, 4, XPOS_L1);
   1309         assertEquals("7 key fix 4 L1 columns", 4, params.mNumColumns);
   1310         assertEquals("7 key fix 4 L1 rows", 2, params.mNumRows);
   1311         assertEquals("7 key fix 4 L1 left", 0, params.mLeftKeys);
   1312         assertEquals("7 key fix 4 L1 right", 4, params.mRightKeys);
   1313         assertEquals("7 key fix 4 L1 <1>", 0, params.getColumnPos(0));
   1314         assertEquals("7 key fix 4 L1 [2]", 1, params.getColumnPos(1));
   1315         assertEquals("7 key fix 4 L1 [3]", 2, params.getColumnPos(2));
   1316         assertEquals("7 key fix 4 L1 [4]", 3, params.getColumnPos(3));
   1317         assertEquals("7 key fix 4 L1 [5]", 0, params.getColumnPos(4));
   1318         assertEquals("7 key fix 4 L1 [6]", 1, params.getColumnPos(5));
   1319         assertEquals("7 key fix 4 l1 [7]", 2, params.getColumnPos(6));
   1320         assertEquals("7 key fix 4 L1 adjust", 0, params.mTopRowAdjustment);
   1321         assertEquals("7 key fix 4 L1 default", WIDTH * 0, params.getDefaultKeyCoordX());
   1322     }
   1323 
   1324     // |___ [5] [6] [7]
   1325     // |___ [1] <2> [3] [4]
   1326     public void testLayout7KeyFix4L2() {
   1327         MoreKeysKeyboardParams params = createParams(7, 4, XPOS_L2);
   1328         assertEquals("7 key fix 4 L2 columns", 4, params.mNumColumns);
   1329         assertEquals("7 key fix 4 L2 rows", 2, params.mNumRows);
   1330         assertEquals("7 key fix 4 L2 left", 1, params.mLeftKeys);
   1331         assertEquals("7 key fix 4 L2 right", 3, params.mRightKeys);
   1332         assertEquals("7 key fix 4 L2 [1]", -1, params.getColumnPos(0));
   1333         assertEquals("7 key fix 4 L2 <2>", 0, params.getColumnPos(1));
   1334         assertEquals("7 key fix 4 L2 [3]", 1, params.getColumnPos(2));
   1335         assertEquals("7 key fix 4 L2 [4]", 2, params.getColumnPos(3));
   1336         assertEquals("7 key fix 4 L2 [5]", -1, params.getColumnPos(4));
   1337         assertEquals("7 key fix 4 L2 [6]", 0, params.getColumnPos(5));
   1338         assertEquals("7 key fix 4 L2 [7]", 1, params.getColumnPos(6));
   1339         assertEquals("7 key fix 4 L2 adjust", 0, params.mTopRowAdjustment);
   1340         assertEquals("7 key fix 4 L2 default", WIDTH * 1, params.getDefaultKeyCoordX());
   1341     }
   1342 
   1343     //     [5] [6] [7]|
   1344     // [1] [2] [3] <4>|
   1345     public void testLayout7KeyFix4R0() {
   1346         MoreKeysKeyboardParams params = createParams(7, 4, XPOS_R0);
   1347         assertEquals("7 key fix 4 R0 columns", 4, params.mNumColumns);
   1348         assertEquals("7 key fix 4 R0 rows", 2, params.mNumRows);
   1349         assertEquals("7 key fix 4 R0 left", 3, params.mLeftKeys);
   1350         assertEquals("7 key fix 4 R0 right", 1, params.mRightKeys);
   1351         assertEquals("7 key fix 4 R0 [1]", -3, params.getColumnPos(0));
   1352         assertEquals("7 key fix 4 R0 [2]", -2, params.getColumnPos(1));
   1353         assertEquals("7 key fix 4 R0 [3]", -1, params.getColumnPos(2));
   1354         assertEquals("7 key fix 4 R0 <4>", 0, params.getColumnPos(3));
   1355         assertEquals("7 key fix 4 R0 [5]", -2, params.getColumnPos(4));
   1356         assertEquals("7 key fix 4 R0 [6]", -1, params.getColumnPos(5));
   1357         assertEquals("7 key fix 4 R0 [7]", 0, params.getColumnPos(6));
   1358         assertEquals("7 key fix 4 R0 adjust", 0, params.mTopRowAdjustment);
   1359         assertEquals("7 key fix 4 R0 default", WIDTH * 3, params.getDefaultKeyCoordX());
   1360     }
   1361 
   1362     //     [5] [6] [7] ___|
   1363     // [1] [2] [3] <4> ___|
   1364     public void testLayout7KeyFix4R1() {
   1365         MoreKeysKeyboardParams params = createParams(7, 4, XPOS_R1);
   1366         assertEquals("7 key fix 4 R1 columns", 4, params.mNumColumns);
   1367         assertEquals("7 key fix 4 R1 rows", 2, params.mNumRows);
   1368         assertEquals("7 key fix 4 R1 left", 3, params.mLeftKeys);
   1369         assertEquals("7 key fix 4 R1 right", 1, params.mRightKeys);
   1370         assertEquals("7 key fix 4 R1 [1]", -3, params.getColumnPos(0));
   1371         assertEquals("7 key fix 4 R1 [2]", -2, params.getColumnPos(1));
   1372         assertEquals("7 key fix 4 R1 [3]", -1, params.getColumnPos(2));
   1373         assertEquals("7 key fix 4 R1 <4>", 0, params.getColumnPos(3));
   1374         assertEquals("7 key fix 4 R1 [5]", -2, params.getColumnPos(4));
   1375         assertEquals("7 key fix 4 R1 [6]", -1, params.getColumnPos(5));
   1376         assertEquals("7 key fix 4 R1 [7]", 0, params.getColumnPos(6));
   1377         assertEquals("7 key fix 4 R1 adjust", 0, params.mTopRowAdjustment);
   1378         assertEquals("7 key fix 4 R1 default", WIDTH * 3, params.getDefaultKeyCoordX());
   1379     }
   1380 
   1381     //     [5] [6] [7] ___|
   1382     // [1] [2] <3> [4] ___|
   1383     public void testLayout7KeyFix4R2() {
   1384         MoreKeysKeyboardParams params = createParams(7, 4, XPOS_R2);
   1385         assertEquals("7 key fix 4 R2 columns", 4, params.mNumColumns);
   1386         assertEquals("7 key fix 4 R2 rows", 2, params.mNumRows);
   1387         assertEquals("7 key fix 4 R2 left", 2, params.mLeftKeys);
   1388         assertEquals("7 key fix 4 R2 right", 2, params.mRightKeys);
   1389         assertEquals("7 key fix 4 R2 [1]", -2, params.getColumnPos(0));
   1390         assertEquals("7 key fix 4 R2 [2]", -1, params.getColumnPos(1));
   1391         assertEquals("7 key fix 4 R2 <3>", 0, params.getColumnPos(2));
   1392         assertEquals("7 key fix 4 R2 [4]", 1, params.getColumnPos(3));
   1393         assertEquals("7 key fix 4 R2 [5]", -1, params.getColumnPos(4));
   1394         assertEquals("7 key fix 4 R2 [6]", 0, params.getColumnPos(5));
   1395         assertEquals("7 key fix 4 R2 [7]", 1, params.getColumnPos(6));
   1396         assertEquals("7 key fix 4 R2 adjust", 0, params.mTopRowAdjustment);
   1397         assertEquals("7 key fix 4 R2 default", WIDTH * 2, params.getDefaultKeyCoordX());
   1398     }
   1399 
   1400     // [5] [6] [7] [8]
   1401     // [1] <2> [3] [4]
   1402     public void testLayout8KeyFix4M0() {
   1403         MoreKeysKeyboardParams params = createParams(8, 4, XPOS_M0);
   1404         assertEquals("8 key fix 4 M0 columns", 4, params.mNumColumns);
   1405         assertEquals("8 key fix 4 M0 rows", 2, params.mNumRows);
   1406         assertEquals("8 key fix 4 M0 left", 1, params.mLeftKeys);
   1407         assertEquals("8 key fix 4 M0 right", 3, params.mRightKeys);
   1408         assertEquals("8 key fix 4 M0 [1]", -1, params.getColumnPos(0));
   1409         assertEquals("8 key fix 4 M0 <2>", 0, params.getColumnPos(1));
   1410         assertEquals("8 key fix 4 M0 [3]", 1, params.getColumnPos(2));
   1411         assertEquals("8 key fix 4 M0 [4]", 2, params.getColumnPos(3));
   1412         assertEquals("8 key fix 4 M0 [5]", -1, params.getColumnPos(4));
   1413         assertEquals("8 key fix 4 M0 [6]", 0, params.getColumnPos(5));
   1414         assertEquals("8 key fix 4 M0 [7]", 1, params.getColumnPos(6));
   1415         assertEquals("8 key fix 4 M0 [8]", 2, params.getColumnPos(7));
   1416         assertEquals("8 key fix 4 M0 adjust", 0, params.mTopRowAdjustment);
   1417         assertEquals("8 key fix 4 M0 default", WIDTH * 1, params.getDefaultKeyCoordX());
   1418     }
   1419 
   1420     // |[5] [6] [7] [8]
   1421     // |<1> [2] [3] [4]
   1422     public void testLayout8KeyFix4L0() {
   1423         MoreKeysKeyboardParams params = createParams(8, 4, XPOS_L0);
   1424         assertEquals("8 key fix 4 L0 columns", 4, params.mNumColumns);
   1425         assertEquals("8 key fix 4 L0 rows", 2, params.mNumRows);
   1426         assertEquals("8 key fix 4 L0 left", 0, params.mLeftKeys);
   1427         assertEquals("8 key fix 4 L0 right", 4, params.mRightKeys);
   1428         assertEquals("8 key fix 4 L0 <1>", 0, params.getColumnPos(0));
   1429         assertEquals("8 key fix 4 L0 [2]", 1, params.getColumnPos(1));
   1430         assertEquals("8 key fix 4 L0 [3]", 2, params.getColumnPos(2));
   1431         assertEquals("8 key fix 4 L0 [4]", 3, params.getColumnPos(3));
   1432         assertEquals("8 key fix 4 L0 [5]", 0, params.getColumnPos(4));
   1433         assertEquals("8 key fix 4 L0 [6]", 1, params.getColumnPos(5));
   1434         assertEquals("8 key fix 4 L0 [7]", 2, params.getColumnPos(6));
   1435         assertEquals("8 key fix 4 L0 [8]", 3, params.getColumnPos(7));
   1436         assertEquals("8 key fix 4 L0 adjust", 0, params.mTopRowAdjustment);
   1437         assertEquals("8 key fix 4 L0 default", WIDTH * 0, params.getDefaultKeyCoordX());
   1438     }
   1439 
   1440     // |___ [5] [6] [7] [8]
   1441     // |___ <1> [2] [3] [4]
   1442     public void testLayout8KeyFix4L1() {
   1443         MoreKeysKeyboardParams params = createParams(8, 4, XPOS_L1);
   1444         assertEquals("8 key fix 4 L1 columns", 4, params.mNumColumns);
   1445         assertEquals("8 key fix 4 L1 rows", 2, params.mNumRows);
   1446         assertEquals("8 key fix 4 L1 left", 0, params.mLeftKeys);
   1447         assertEquals("8 key fix 4 L1 right", 4, params.mRightKeys);
   1448         assertEquals("8 key fix 4 L1 <1>", 0, params.getColumnPos(0));
   1449         assertEquals("8 key fix 4 L1 [2]", 1, params.getColumnPos(1));
   1450         assertEquals("8 key fix 4 L1 [3]", 2, params.getColumnPos(2));
   1451         assertEquals("8 key fix 4 L1 [4]", 3, params.getColumnPos(3));
   1452         assertEquals("8 key fix 4 L1 [5]", 0, params.getColumnPos(4));
   1453         assertEquals("8 key fix 4 L1 [6]", 1, params.getColumnPos(5));
   1454         assertEquals("8 key fix 4 L1 [7]", 2, params.getColumnPos(6));
   1455         assertEquals("8 key fix 4 L1 [8]", 3, params.getColumnPos(7));
   1456         assertEquals("8 key fix 4 L1 adjust", 0, params.mTopRowAdjustment);
   1457         assertEquals("8 key fix 4 L1 default", WIDTH * 0, params.getDefaultKeyCoordX());
   1458     }
   1459 
   1460     // |___ [5] [6] [7] [8]
   1461     // |___ [1] <2> [3] [4]
   1462     public void testLayout8KeyFix4L2() {
   1463         MoreKeysKeyboardParams params = createParams(8, 4, XPOS_L2);
   1464         assertEquals("8 key fix 4 L2 columns", 4, params.mNumColumns);
   1465         assertEquals("8 key fix 4 L2 rows", 2, params.mNumRows);
   1466         assertEquals("8 key fix 4 L2 left", 1, params.mLeftKeys);
   1467         assertEquals("8 key fix 4 L2 right", 3, params.mRightKeys);
   1468         assertEquals("8 key fix 4 L2 [1]", -1, params.getColumnPos(0));
   1469         assertEquals("8 key fix 4 L2 <2>", 0, params.getColumnPos(1));
   1470         assertEquals("8 key fix 4 L2 [3]", 1, params.getColumnPos(2));
   1471         assertEquals("8 key fix 4 L2 [4]", 2, params.getColumnPos(3));
   1472         assertEquals("8 key fix 4 L2 [5]", -1, params.getColumnPos(4));
   1473         assertEquals("8 key fix 4 L2 [6]", 0, params.getColumnPos(5));
   1474         assertEquals("8 key fix 4 L2 [7]", 1, params.getColumnPos(6));
   1475         assertEquals("8 key fix 4 L2 [8]", 2, params.getColumnPos(7));
   1476         assertEquals("8 key fix 4 L2 adjust", 0, params.mTopRowAdjustment);
   1477         assertEquals("8 key fix 4 L2 default", WIDTH * 1, params.getDefaultKeyCoordX());
   1478     }
   1479 
   1480     // [5] [6] [7] [8]|
   1481     // [1] [2] [3] <4>|
   1482     public void testLayout8KeyFix4R0() {
   1483         MoreKeysKeyboardParams params = createParams(8, 4, XPOS_R0);
   1484         assertEquals("8 key fix 4 R0 columns", 4, params.mNumColumns);
   1485         assertEquals("8 key fix 4 R0 rows", 2, params.mNumRows);
   1486         assertEquals("8 key fix 4 R0 left", 3, params.mLeftKeys);
   1487         assertEquals("8 key fix 4 R0 right", 1, params.mRightKeys);
   1488         assertEquals("8 key fix 4 R0 [1]", -3, params.getColumnPos(0));
   1489         assertEquals("8 key fix 4 R0 [2]", -2, params.getColumnPos(1));
   1490         assertEquals("8 key fix 4 R0 [3]", -1, params.getColumnPos(2));
   1491         assertEquals("8 key fix 4 R0 <4>", 0, params.getColumnPos(3));
   1492         assertEquals("8 key fix 4 R0 [5]", -3, params.getColumnPos(4));
   1493         assertEquals("8 key fix 4 R0 [6]", -2, params.getColumnPos(5));
   1494         assertEquals("8 key fix 4 R0 [7]", -1, params.getColumnPos(6));
   1495         assertEquals("8 key fix 4 R0 [8]", 0, params.getColumnPos(7));
   1496         assertEquals("8 key fix 4 R0 adjust", 0, params.mTopRowAdjustment);
   1497         assertEquals("8 key fix 4 R0 default", WIDTH * 3, params.getDefaultKeyCoordX());
   1498     }
   1499 
   1500     // [5] [6] [7] [8] ___|
   1501     // [1] [2] [3] <4> ___|
   1502     public void testLayout8KeyFix4R1() {
   1503         MoreKeysKeyboardParams params = createParams(8, 4, XPOS_R1);
   1504         assertEquals("8 key fix 4 R1 columns", 4, params.mNumColumns);
   1505         assertEquals("8 key fix 4 R1 rows", 2, params.mNumRows);
   1506         assertEquals("8 key fix 4 R1 left", 3, params.mLeftKeys);
   1507         assertEquals("8 key fix 4 R1 right", 1, params.mRightKeys);
   1508         assertEquals("8 key fix 4 R1 [1]", -3, params.getColumnPos(0));
   1509         assertEquals("8 key fix 4 R1 [2]", -2, params.getColumnPos(1));
   1510         assertEquals("8 key fix 4 R1 [3]", -1, params.getColumnPos(2));
   1511         assertEquals("8 key fix 4 R1 <4>", 0, params.getColumnPos(3));
   1512         assertEquals("8 key fix 4 R1 [5]", -3, params.getColumnPos(4));
   1513         assertEquals("8 key fix 4 R1 [6]", -2, params.getColumnPos(5));
   1514         assertEquals("8 key fix 4 R1 [7]", -1, params.getColumnPos(6));
   1515         assertEquals("8 key fix 4 R1 [8]", 0, params.getColumnPos(7));
   1516         assertEquals("8 key fix 4 R1 adjust", 0, params.mTopRowAdjustment);
   1517         assertEquals("8 key fix 4 R1 default", WIDTH * 3, params.getDefaultKeyCoordX());
   1518     }
   1519 
   1520     // [5] [6] [7] [8] ___|
   1521     // [1] [2] <3> [4] ___|
   1522     public void testLayout8KeyFix4R2() {
   1523         MoreKeysKeyboardParams params = createParams(8, 4, XPOS_R2);
   1524         assertEquals("8 key fix 4 R2 columns", 4, params.mNumColumns);
   1525         assertEquals("8 key fix 4 R2 rows", 2, params.mNumRows);
   1526         assertEquals("8 key fix 4 R2 left", 2, params.mLeftKeys);
   1527         assertEquals("8 key fix 4 R2 right", 2, params.mRightKeys);
   1528         assertEquals("8 key fix 4 R2 [1]", -2, params.getColumnPos(0));
   1529         assertEquals("8 key fix 4 R2 [2]", -1, params.getColumnPos(1));
   1530         assertEquals("8 key fix 4 R2 <3>", 0, params.getColumnPos(2));
   1531         assertEquals("8 key fix 4 R2 [4]", 1, params.getColumnPos(3));
   1532         assertEquals("8 key fix 4 R2 [5]", -2, params.getColumnPos(4));
   1533         assertEquals("8 key fix 4 R2 [6]", -1, params.getColumnPos(5));
   1534         assertEquals("8 key fix 4 R2 [7]", 0, params.getColumnPos(6));
   1535         assertEquals("8 key fix 4 R2 [8]", 1, params.getColumnPos(7));
   1536         assertEquals("8 key fix 4 R2 adjust", 0, params.mTopRowAdjustment);
   1537         assertEquals("8 key fix 4 R2 default", WIDTH * 2, params.getDefaultKeyCoordX());
   1538     }
   1539 
   1540      // [1] [2] <3> [4] [5]
   1541     public void testLayout5KeyFix5M0() {
   1542         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_M0);
   1543         assertEquals("5 key fix 5 columns", 5, params.mNumColumns);
   1544         assertEquals("5 key fix 5 rows", 1, params.mNumRows);
   1545         assertEquals("5 key fix 5 left", 2, params.mLeftKeys);
   1546         assertEquals("5 key fix 5 right", 3, params.mRightKeys);
   1547         assertEquals("5 key fix 5 [1]", -2, params.getColumnPos(0));
   1548         assertEquals("5 key fix 5 [2]", -1, params.getColumnPos(1));
   1549         assertEquals("5 key fix 5 <3>", 0, params.getColumnPos(2));
   1550         assertEquals("5 key fix 5 [4]", 1, params.getColumnPos(3));
   1551         assertEquals("5 key fix 5 [5]", 2, params.getColumnPos(4));
   1552         assertEquals("5 key fix 5 adjust", 0, params.mTopRowAdjustment);
   1553         assertEquals("5 key fix 5 default", WIDTH * 2, params.getDefaultKeyCoordX());
   1554     }
   1555 
   1556     // |<1> [2] [3] [4] [5]
   1557     public void testLayout5KeyFix5L0() {
   1558         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_L0);
   1559         assertEquals("5 key fix 5 L0 columns", 5, params.mNumColumns);
   1560         assertEquals("5 key fix 5 L0 rows", 1, params.mNumRows);
   1561         assertEquals("5 key fix 5 L0 left", 0, params.mLeftKeys);
   1562         assertEquals("5 key fix 5 L0 right", 5, params.mRightKeys);
   1563         assertEquals("5 key fix 5 L0 <1>", 0, params.getColumnPos(0));
   1564         assertEquals("5 key fix 5 L0 [2]", 1, params.getColumnPos(1));
   1565         assertEquals("5 key fix 5 L0 [3]", 2, params.getColumnPos(2));
   1566         assertEquals("5 key fix 5 L0 [4]", 3, params.getColumnPos(3));
   1567         assertEquals("5 key fix 5 L0 [5]", 4, params.getColumnPos(4));
   1568         assertEquals("5 key fix 5 L0 adjust", 0, params.mTopRowAdjustment);
   1569         assertEquals("5 key fix 5 L0 default", WIDTH * 0, params.getDefaultKeyCoordX());
   1570     }
   1571 
   1572     // |___ <1> [2] [3] [4] [5]
   1573     public void testLayout5KeyFix5L1() {
   1574         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_L1);
   1575         assertEquals("5 key fix 5 L1 columns", 5, params.mNumColumns);
   1576         assertEquals("5 key fix 5 L1 rows", 1, params.mNumRows);
   1577         assertEquals("5 key fix 5 L1 left", 0, params.mLeftKeys);
   1578         assertEquals("5 key fix 5 L1 right", 5, params.mRightKeys);
   1579         assertEquals("5 key fix 5 L1 <1>", 0, params.getColumnPos(0));
   1580         assertEquals("5 key fix 5 L1 [2]", 1, params.getColumnPos(1));
   1581         assertEquals("5 key fix 5 L1 [3]", 2, params.getColumnPos(2));
   1582         assertEquals("5 key fix 5 L1 [4]", 3, params.getColumnPos(3));
   1583         assertEquals("5 key fix 5 L1 [5]", 4, params.getColumnPos(4));
   1584         assertEquals("5 key fix 5 L1 adjust", 0, params.mTopRowAdjustment);
   1585         assertEquals("5 key fix 5 L1 default", WIDTH * 0, params.getDefaultKeyCoordX());
   1586     }
   1587 
   1588     // |___ [1] <2> [3] [4] [5]
   1589     public void testLayout5KeyFix5L2() {
   1590         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_L2);
   1591         assertEquals("5 key fix 5 L2 columns", 5, params.mNumColumns);
   1592         assertEquals("5 key fix 5 L2 rows", 1, params.mNumRows);
   1593         assertEquals("5 key fix 5 L2 left", 1, params.mLeftKeys);
   1594         assertEquals("5 key fix 5 L2 right", 4, params.mRightKeys);
   1595         assertEquals("5 key fix 5 L2 [1]", -1, params.getColumnPos(0));
   1596         assertEquals("5 key fix 5 L2 <2>", 0, params.getColumnPos(1));
   1597         assertEquals("5 key fix 5 L2 [3]", 1, params.getColumnPos(2));
   1598         assertEquals("5 key fix 5 L2 [4]", 2, params.getColumnPos(3));
   1599         assertEquals("5 key fix 5 L2 [5]", 3, params.getColumnPos(4));
   1600         assertEquals("5 key fix 5 L2 adjust", 0, params.mTopRowAdjustment);
   1601         assertEquals("5 key fix 5 L2 default", WIDTH * 1, params.getDefaultKeyCoordX());
   1602     }
   1603 
   1604     // [1] [2] [3] [4] <5>|
   1605     public void testLayout5KeyFix5R0() {
   1606         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_R0);
   1607         assertEquals("5 key fix 5 R0 columns", 5, params.mNumColumns);
   1608         assertEquals("5 key fix 5 R0 rows", 1, params.mNumRows);
   1609         assertEquals("5 key fix 5 R0 left", 4, params.mLeftKeys);
   1610         assertEquals("5 key fix 5 R0 right", 1, params.mRightKeys);
   1611         assertEquals("5 key fix 5 R0 [1]", -4, params.getColumnPos(0));
   1612         assertEquals("5 key fix 5 R0 [2]", -3, params.getColumnPos(1));
   1613         assertEquals("5 key fix 5 R0 [3]", -2, params.getColumnPos(2));
   1614         assertEquals("5 key fix 5 R0 [4]", -1, params.getColumnPos(3));
   1615         assertEquals("5 key fix 5 R0 <5>", 0, params.getColumnPos(4));
   1616         assertEquals("5 key fix 5 R0 adjust", 0, params.mTopRowAdjustment);
   1617         assertEquals("5 key fix 5 R0 default", WIDTH * 4, params.getDefaultKeyCoordX());
   1618     }
   1619 
   1620     // [1] [2] [3] [4] <5> ___|
   1621     public void testLayout5KeyFix5R1() {
   1622         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_R1);
   1623         assertEquals("5 key fix 5 R1 columns", 5, params.mNumColumns);
   1624         assertEquals("5 key fix 5 R1 rows", 1, params.mNumRows);
   1625         assertEquals("5 key fix 5 R1 left", 4, params.mLeftKeys);
   1626         assertEquals("5 key fix 5 R1 right", 1, params.mRightKeys);
   1627         assertEquals("5 key fix 5 R1 [1]", -4, params.getColumnPos(0));
   1628         assertEquals("5 key fix 5 R1 [2]", -3, params.getColumnPos(1));
   1629         assertEquals("5 key fix 5 R1 [3]", -2, params.getColumnPos(2));
   1630         assertEquals("5 key fix 5 R1 [4]", -1, params.getColumnPos(3));
   1631         assertEquals("5 key fix 5 R1 <5>", 0, params.getColumnPos(4));
   1632         assertEquals("5 key fix 5 R1 adjust", 0, params.mTopRowAdjustment);
   1633         assertEquals("5 key fix 5 R1 default", WIDTH * 4, params.getDefaultKeyCoordX());
   1634     }
   1635 
   1636     // [1] [2] [3] <4> [5] ___|
   1637     public void testLayout5KeyFix5R2() {
   1638         MoreKeysKeyboardParams params = createParams(5, 5, XPOS_R2);
   1639         assertEquals("5 key fix 5 R2 columns", 5, params.mNumColumns);
   1640         assertEquals("5 key fix 5 R2 rows", 1, params.mNumRows);
   1641         assertEquals("5 key fix 5 R2 left", 3, params.mLeftKeys);
   1642         assertEquals("5 key fix 5 R2 right", 2, params.mRightKeys);
   1643         assertEquals("5 key fix 5 R2 [1]", -3, params.getColumnPos(0));
   1644         assertEquals("5 key fix 5 R2 [2]", -2, params.getColumnPos(1));
   1645         assertEquals("5 key fix 5 R2 [3]", -1, params.getColumnPos(2));
   1646         assertEquals("5 key fix 5 R2 <4>", 0, params.getColumnPos(3));
   1647         assertEquals("5 key fix 5 R2 [5]", 1, params.getColumnPos(4));
   1648         assertEquals("5 key fix 5 R2 adjust", 0, params.mTopRowAdjustment);
   1649         assertEquals("5 key fix 5 R2 default", WIDTH * 3, params.getDefaultKeyCoordX());
   1650     }
   1651 
   1652     //         [6]
   1653     // [1] [2] <3> [4] [5]
   1654     public void testLayout6KeyFix5M0() {
   1655         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_M0);
   1656         assertEquals("6 key fix 5 columns", 5, params.mNumColumns);
   1657         assertEquals("6 key fix 5 rows", 2, params.mNumRows);
   1658         assertEquals("6 key fix 5 left", 2, params.mLeftKeys);
   1659         assertEquals("6 key fix 5 right", 3, params.mRightKeys);
   1660         assertEquals("6 key fix 5 [1]", -2, params.getColumnPos(0));
   1661         assertEquals("6 key fix 5 [2]", -1, params.getColumnPos(1));
   1662         assertEquals("6 key fix 5 <3>", 0, params.getColumnPos(2));
   1663         assertEquals("6 key fix 5 [4]", 1, params.getColumnPos(3));
   1664         assertEquals("6 key fix 5 [5]", 2, params.getColumnPos(4));
   1665         assertEquals("6 key fix 5 [6]", 0, params.getColumnPos(5));
   1666         assertEquals("6 key fix 5 adjust", 0, params.mTopRowAdjustment);
   1667         assertEquals("6 key fix 5 default", WIDTH * 2, params.getDefaultKeyCoordX());
   1668     }
   1669 
   1670     // |[6]
   1671     // |<1> [2] [3] [4] [5]
   1672     public void testLayout6KeyFix5L0() {
   1673         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_L0);
   1674         assertEquals("6 key fix 5 L0 columns", 5, params.mNumColumns);
   1675         assertEquals("6 key fix 5 L0 rows", 2, params.mNumRows);
   1676         assertEquals("6 key fix 5 L0 left", 0, params.mLeftKeys);
   1677         assertEquals("6 key fix 5 L0 right", 5, params.mRightKeys);
   1678         assertEquals("6 key fix 5 L0 <1>", 0, params.getColumnPos(0));
   1679         assertEquals("6 key fix 5 L0 [2]", 1, params.getColumnPos(1));
   1680         assertEquals("6 key fix 5 L0 [3]", 2, params.getColumnPos(2));
   1681         assertEquals("6 key fix 5 L0 [4]", 3, params.getColumnPos(3));
   1682         assertEquals("6 key fix 5 L0 [5]", 4, params.getColumnPos(4));
   1683         assertEquals("6 key fix 5 L0 [6]", 0, params.getColumnPos(5));
   1684         assertEquals("6 key fix 5 L0 adjust", 0, params.mTopRowAdjustment);
   1685         assertEquals("6 key fix 5 L0 default", WIDTH * 0, params.getDefaultKeyCoordX());
   1686     }
   1687 
   1688     // |___ [6]
   1689     // |___ <1> [2] [3] [4] [5]
   1690     public void testLayout6KeyFix5L1() {
   1691         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_L1);
   1692         assertEquals("6 key fix 5 L1 columns", 5, params.mNumColumns);
   1693         assertEquals("6 key fix 5 L1 rows", 2, params.mNumRows);
   1694         assertEquals("6 key fix 5 L1 left", 0, params.mLeftKeys);
   1695         assertEquals("6 key fix 5 L1 right", 5, params.mRightKeys);
   1696         assertEquals("6 key fix 5 L1 <1>", 0, params.getColumnPos(0));
   1697         assertEquals("6 key fix 5 L1 [2]", 1, params.getColumnPos(1));
   1698         assertEquals("6 key fix 5 L1 [3]", 2, params.getColumnPos(2));
   1699         assertEquals("6 key fix 5 L1 [4]", 3, params.getColumnPos(3));
   1700         assertEquals("6 key fix 5 L1 [5]", 4, params.getColumnPos(4));
   1701         assertEquals("6 key fix 5 L1 [6]", 0, params.getColumnPos(5));
   1702         assertEquals("6 key fix 5 L1 adjust", 0, params.mTopRowAdjustment);
   1703         assertEquals("6 key fix 5 L1 default", WIDTH * 0, params.getDefaultKeyCoordX());
   1704     }
   1705 
   1706     // |___     [6]
   1707     // |___ [1] <2> [3] [4] [5]
   1708     public void testLayout6KeyFix5L2() {
   1709         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_L2);
   1710         assertEquals("6 key fix 5 L2 columns", 5, params.mNumColumns);
   1711         assertEquals("6 key fix 5 L2 rows", 2, params.mNumRows);
   1712         assertEquals("6 key fix 5 L2 left", 1, params.mLeftKeys);
   1713         assertEquals("6 key fix 5 L2 right", 4, params.mRightKeys);
   1714         assertEquals("6 key fix 5 L2 [1]", -1, params.getColumnPos(0));
   1715         assertEquals("6 key fix 5 L2 <2>", 0, params.getColumnPos(1));
   1716         assertEquals("6 key fix 5 L2 [3]", 1, params.getColumnPos(2));
   1717         assertEquals("6 key fix 5 L2 [4]", 2, params.getColumnPos(3));
   1718         assertEquals("6 key fix 5 L2 [5]", 3, params.getColumnPos(4));
   1719         assertEquals("6 key fix 5 L2 [6]", 0, params.getColumnPos(5));
   1720         assertEquals("6 key fix 5 L2 adjust", 0, params.mTopRowAdjustment);
   1721         assertEquals("6 key fix 5 L2 default", WIDTH * 1, params.getDefaultKeyCoordX());
   1722     }
   1723 
   1724     //                 [6]|
   1725     // [1] [2] [3] [4] <5>|
   1726     public void testLayout6KeyFix5R0() {
   1727         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_R0);
   1728         assertEquals("6 key fix 5 R0 columns", 5, params.mNumColumns);
   1729         assertEquals("6 key fix 5 R0 rows", 2, params.mNumRows);
   1730         assertEquals("6 key fix 5 R0 left", 4, params.mLeftKeys);
   1731         assertEquals("6 key fix 5 R0 right", 1, params.mRightKeys);
   1732         assertEquals("6 key fix 5 R0 [1]", -4, params.getColumnPos(0));
   1733         assertEquals("6 key fix 5 R0 [2]", -3, params.getColumnPos(1));
   1734         assertEquals("6 key fix 5 R0 [3]", -2, params.getColumnPos(2));
   1735         assertEquals("6 key fix 5 R0 [4]", -1, params.getColumnPos(3));
   1736         assertEquals("6 key fix 5 R0 <5>", 0, params.getColumnPos(4));
   1737         assertEquals("6 key fix 5 R0 [6]", 0, params.getColumnPos(5));
   1738         assertEquals("6 key fix 5 R0 adjust", 0, params.mTopRowAdjustment);
   1739         assertEquals("6 key fix 5 R0 default", WIDTH * 4, params.getDefaultKeyCoordX());
   1740     }
   1741 
   1742     //                 [6] ___|
   1743     // [1] [2] [3] [4] <5> ___|
   1744     public void testLayout6KeyFix5R1() {
   1745         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_R1);
   1746         assertEquals("6 key fix 5 R1 columns", 5, params.mNumColumns);
   1747         assertEquals("6 key fix 5 R1 rows", 2, params.mNumRows);
   1748         assertEquals("6 key fix 5 R1 left", 4, params.mLeftKeys);
   1749         assertEquals("6 key fix 5 R1 right", 1, params.mRightKeys);
   1750         assertEquals("6 key fix 5 R1 [1]", -4, params.getColumnPos(0));
   1751         assertEquals("6 key fix 5 R1 [2]", -3, params.getColumnPos(1));
   1752         assertEquals("6 key fix 5 R1 [3]", -2, params.getColumnPos(2));
   1753         assertEquals("6 key fix 5 R1 [4]", -1, params.getColumnPos(3));
   1754         assertEquals("6 key fix 5 R1 <5>", 0, params.getColumnPos(4));
   1755         assertEquals("6 key fix 5 R1 [6]", 0, params.getColumnPos(5));
   1756         assertEquals("6 key fix 5 R1 adjust", 0, params.mTopRowAdjustment);
   1757         assertEquals("6 key fix 5 R1 default", WIDTH * 4, params.getDefaultKeyCoordX());
   1758     }
   1759 
   1760     //             [6]     ___|
   1761     // [1] [2] [3] <4> [5] ___|
   1762     public void testLayout6KeyFix5R2() {
   1763         MoreKeysKeyboardParams params = createParams(6, 5, XPOS_R2);
   1764         assertEquals("6 key fix 5 R2 columns", 5, params.mNumColumns);
   1765         assertEquals("6 key fix 5 R2 rows", 2, params.mNumRows);
   1766         assertEquals("6 key fix 5 R2 left", 3, params.mLeftKeys);
   1767         assertEquals("6 key fix 5 R2 right", 2, params.mRightKeys);
   1768         assertEquals("6 key fix 5 R2 [1]", -3, params.getColumnPos(0));
   1769         assertEquals("6 key fix 5 R2 [2]", -2, params.getColumnPos(1));
   1770         assertEquals("6 key fix 5 R2 [3]", -1, params.getColumnPos(2));
   1771         assertEquals("6 key fix 5 R2 <4>", 0, params.getColumnPos(3));
   1772         assertEquals("6 key fix 5 R2 [5]", 1, params.getColumnPos(4));
   1773         assertEquals("6 key fix 5 R2 [6]", 0, params.getColumnPos(5));
   1774         assertEquals("6 key fix 5 R2 adjust", 0, params.mTopRowAdjustment);
   1775         assertEquals("6 key fix 5 R2 default", WIDTH * 3, params.getDefaultKeyCoordX());
   1776     }
   1777 
   1778     //       [6] [7]
   1779     // [1] [2] <3> [4] [5]
   1780     public void testLayout7KeyFix5M0() {
   1781         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_M0);
   1782         assertEquals("7 key fix 5 columns", 5, params.mNumColumns);
   1783         assertEquals("7 key fix 5 rows", 2, params.mNumRows);
   1784         assertEquals("7 key fix 5 left", 2, params.mLeftKeys);
   1785         assertEquals("7 key fix 5 right", 3, params.mRightKeys);
   1786         assertEquals("7 key fix 5 [1]", -2, params.getColumnPos(0));
   1787         assertEquals("7 key fix 5 [2]", -1, params.getColumnPos(1));
   1788         assertEquals("7 key fix 5 <3>", 0, params.getColumnPos(2));
   1789         assertEquals("7 key fix 5 [4]", 1, params.getColumnPos(3));
   1790         assertEquals("7 key fix 5 [5]", 2, params.getColumnPos(4));
   1791         assertEquals("7 key fix 5 [6]", 0, params.getColumnPos(5));
   1792         assertEquals("7 key fix 5 [7]", 1, params.getColumnPos(6));
   1793         assertEquals("7 key fix 5 adjust", -1, params.mTopRowAdjustment);
   1794         assertEquals("7 key fix 5 default", WIDTH * 2, params.getDefaultKeyCoordX());
   1795     }
   1796 
   1797     // |[6] [7]
   1798     // |<1> [2] [3] [4] [5]
   1799     public void testLayout7KeyFix5L0() {
   1800         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_L0);
   1801         assertEquals("7 key fix 5 L0 columns", 5, params.mNumColumns);
   1802         assertEquals("7 key fix 5 L0 rows", 2, params.mNumRows);
   1803         assertEquals("7 key fix 5 L0 left", 0, params.mLeftKeys);
   1804         assertEquals("7 key fix 5 L0 right", 5, params.mRightKeys);
   1805         assertEquals("7 key fix 5 L0 <1>", 0, params.getColumnPos(0));
   1806         assertEquals("7 key fix 5 L0 [2]", 1, params.getColumnPos(1));
   1807         assertEquals("7 key fix 5 L0 [3]", 2, params.getColumnPos(2));
   1808         assertEquals("7 key fix 5 L0 [4]", 3, params.getColumnPos(3));
   1809         assertEquals("7 key fix 5 L0 [5]", 4, params.getColumnPos(4));
   1810         assertEquals("7 key fix 5 L0 [6]", 0, params.getColumnPos(5));
   1811         assertEquals("7 key fix 5 L0 [7]", 1, params.getColumnPos(6));
   1812         assertEquals("7 key fix 5 L0 adjust", 0, params.mTopRowAdjustment);
   1813         assertEquals("7 key fix 5 L0 default", WIDTH * 0, params.getDefaultKeyCoordX());
   1814     }
   1815 
   1816     // |___ [6] [7]
   1817     // |___ <1> [2] [3] [4] [5]
   1818     public void testLayout7KeyFix5L1() {
   1819         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_L1);
   1820         assertEquals("7 key fix 5 L1 columns", 5, params.mNumColumns);
   1821         assertEquals("7 key fix 5 L1 rows", 2, params.mNumRows);
   1822         assertEquals("7 key fix 5 L1 left", 0, params.mLeftKeys);
   1823         assertEquals("7 key fix 5 L1 right", 5, params.mRightKeys);
   1824         assertEquals("7 key fix 5 L1 <1>", 0, params.getColumnPos(0));
   1825         assertEquals("7 key fix 5 L1 [2]", 1, params.getColumnPos(1));
   1826         assertEquals("7 key fix 5 L1 [3]", 2, params.getColumnPos(2));
   1827         assertEquals("7 key fix 5 L1 [4]", 3, params.getColumnPos(3));
   1828         assertEquals("7 key fix 5 L1 [5]", 4, params.getColumnPos(4));
   1829         assertEquals("7 key fix 5 L1 [6]", 0, params.getColumnPos(5));
   1830         assertEquals("7 key fix 5 L1 [7]", 1, params.getColumnPos(6));
   1831         assertEquals("7 key fix 5 L1 adjust", 0, params.mTopRowAdjustment);
   1832         assertEquals("7 key fix 5 L1 default", WIDTH * 0, params.getDefaultKeyCoordX());
   1833     }
   1834 
   1835     // |___   [6] [7]
   1836     // |___ [1] <2> [3] [4] [5]
   1837     public void testLayout7KeyFix5L2() {
   1838         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_L2);
   1839         assertEquals("7 key fix 5 L2 columns", 5, params.mNumColumns);
   1840         assertEquals("7 key fix 5 L2 rows", 2, params.mNumRows);
   1841         assertEquals("7 key fix 5 L2 left", 1, params.mLeftKeys);
   1842         assertEquals("7 key fix 5 L2 right", 4, params.mRightKeys);
   1843         assertEquals("7 key fix 5 L2 [1]", -1, params.getColumnPos(0));
   1844         assertEquals("7 key fix 5 L2 <2>", 0, params.getColumnPos(1));
   1845         assertEquals("7 key fix 5 L2 [3]", 1, params.getColumnPos(2));
   1846         assertEquals("7 key fix 5 L2 [4]", 2, params.getColumnPos(3));
   1847         assertEquals("7 key fix 5 L2 [5]", 3, params.getColumnPos(4));
   1848         assertEquals("7 key fix 5 L2 [6]", 0, params.getColumnPos(5));
   1849         assertEquals("7 key fix 5 L2 [7]", 1, params.getColumnPos(6));
   1850         assertEquals("7 key fix 5 L2 adjust", -1, params.mTopRowAdjustment);
   1851         assertEquals("7 key fix 5 L2 default", WIDTH * 1, params.getDefaultKeyCoordX());
   1852     }
   1853 
   1854     //             [6] [7]|
   1855     // [1] [2] [3] [4] <5>|
   1856     public void testLayout7KeyFix5R0() {
   1857         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_R0);
   1858         assertEquals("7 key fix 5 R0 columns", 5, params.mNumColumns);
   1859         assertEquals("7 key fix 5 R0 rows", 2, params.mNumRows);
   1860         assertEquals("7 key fix 5 R0 left", 4, params.mLeftKeys);
   1861         assertEquals("7 key fix 5 R0 right", 1, params.mRightKeys);
   1862         assertEquals("7 key fix 5 R0 [1]", -4, params.getColumnPos(0));
   1863         assertEquals("7 key fix 5 R0 [2]", -3, params.getColumnPos(1));
   1864         assertEquals("7 key fix 5 R0 [3]", -2, params.getColumnPos(2));
   1865         assertEquals("7 key fix 5 R0 [4]", -1, params.getColumnPos(3));
   1866         assertEquals("7 key fix 5 R0 <5>", 0, params.getColumnPos(4));
   1867         assertEquals("7 key fix 5 R0 [6]", -1, params.getColumnPos(5));
   1868         assertEquals("7 key fix 5 R0 [7]", 0, params.getColumnPos(6));
   1869         assertEquals("7 key fix 5 R0 adjust", 0, params.mTopRowAdjustment);
   1870         assertEquals("7 key fix 5 R0 default", WIDTH * 4, params.getDefaultKeyCoordX());
   1871     }
   1872 
   1873     //             [6] [7] ___|
   1874     // [1] [2] [3] [4] <5> ___|
   1875     public void testLayout7KeyFix5R1() {
   1876         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_R1);
   1877         assertEquals("7 key fix 5 R1 columns", 5, params.mNumColumns);
   1878         assertEquals("7 key fix 5 R1 rows", 2, params.mNumRows);
   1879         assertEquals("7 key fix 5 R1 left", 4, params.mLeftKeys);
   1880         assertEquals("7 key fix 5 R1 right", 1, params.mRightKeys);
   1881         assertEquals("7 key fix 5 R1 [1]", -4, params.getColumnPos(0));
   1882         assertEquals("7 key fix 5 R1 [2]", -3, params.getColumnPos(1));
   1883         assertEquals("7 key fix 5 R1 [3]", -2, params.getColumnPos(2));
   1884         assertEquals("7 key fix 5 R1 [4]", -1, params.getColumnPos(3));
   1885         assertEquals("7 key fix 5 R1 <5>", 0, params.getColumnPos(4));
   1886         assertEquals("7 key fix 5 R1 [6]", -1, params.getColumnPos(5));
   1887         assertEquals("7 key fix 5 R1 [7]", 0, params.getColumnPos(6));
   1888         assertEquals("7 key fix 5 R1 adjust", 0, params.mTopRowAdjustment);
   1889         assertEquals("7 key fix 5 R1 default", WIDTH * 4, params.getDefaultKeyCoordX());
   1890     }
   1891 
   1892     //           [6] [7]   ___|
   1893     // [1] [2] [3] <4> [5] ___|
   1894     public void testLayout7KeyFix5R2() {
   1895         MoreKeysKeyboardParams params = createParams(7, 5, XPOS_R2);
   1896         assertEquals("7 key fix 5 R2 columns",5, params.mNumColumns);
   1897         assertEquals("7 key fix 5 R2 rows", 2, params.mNumRows);
   1898         assertEquals("7 key fix 5 R2 left", 3, params.mLeftKeys);
   1899         assertEquals("7 key fix 5 R2 right", 2, params.mRightKeys);
   1900         assertEquals("7 key fix 5 R2 [1]", -3, params.getColumnPos(0));
   1901         assertEquals("7 key fix 5 R2 [2]", -2, params.getColumnPos(1));
   1902         assertEquals("7 key fix 5 R2 [3]", -1, params.getColumnPos(2));
   1903         assertEquals("7 key fix 5 R2 <4>", 0, params.getColumnPos(3));
   1904         assertEquals("7 key fix 5 R2 [5]", 1, params.getColumnPos(4));
   1905         assertEquals("7 key fix 5 R2 [6]", 0, params.getColumnPos(5));
   1906         assertEquals("7 key fix 5 R2 [7]", 1, params.getColumnPos(6));
   1907         assertEquals("7 key fix 5 R2 adjust", -1, params.mTopRowAdjustment);
   1908         assertEquals("7 key fix 5 R2 default", WIDTH * 3, params.getDefaultKeyCoordX());
   1909     }
   1910 
   1911     //     [6] [7] [8]
   1912     // [1] [2] <3> [4] [5]
   1913     public void testLayout8KeyFix5M0() {
   1914         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_M0);
   1915         assertEquals("8 key fix 5 M0 columns", 5, params.mNumColumns);
   1916         assertEquals("8 key fix 5 M0 rows", 2, params.mNumRows);
   1917         assertEquals("8 key fix 5 M0 left", 2, params.mLeftKeys);
   1918         assertEquals("8 key fix 5 M0 right", 3, params.mRightKeys);
   1919         assertEquals("8 key fix 5 M0 [1]", -2, params.getColumnPos(0));
   1920         assertEquals("8 key fix 5 M0 [2]", -1, params.getColumnPos(1));
   1921         assertEquals("8 key fix 5 M0 <3>", 0, params.getColumnPos(2));
   1922         assertEquals("8 key fix 5 M0 [4]", 1, params.getColumnPos(3));
   1923         assertEquals("8 key fix 5 M0 [5]", 2, params.getColumnPos(4));
   1924         assertEquals("8 key fix 5 M0 [6]", -1, params.getColumnPos(5));
   1925         assertEquals("8 key fix 5 M0 [7]", 0, params.getColumnPos(6));
   1926         assertEquals("8 key fix 5 M0 [8]", 1, params.getColumnPos(7));
   1927         assertEquals("8 key fix 5 M0 adjust", 0, params.mTopRowAdjustment);
   1928         assertEquals("8 key fix 5 M0 default", WIDTH * 2, params.getDefaultKeyCoordX());
   1929     }
   1930 
   1931     // |[6] [7] [8]
   1932     // |<1> [2] [3] [4] [5]
   1933     public void testLayout8KeyFix5L0() {
   1934         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_L0);
   1935         assertEquals("8 key fix 5 L0 columns", 5, params.mNumColumns);
   1936         assertEquals("8 key fix 5 L0 rows", 2, params.mNumRows);
   1937         assertEquals("8 key fix 5 L0 left", 0, params.mLeftKeys);
   1938         assertEquals("8 key fix 5 L0 right", 5, params.mRightKeys);
   1939         assertEquals("8 key fix 5 L0 <1>", 0, params.getColumnPos(0));
   1940         assertEquals("8 key fix 5 L0 [2]", 1, params.getColumnPos(1));
   1941         assertEquals("8 key fix 5 L0 [3]", 2, params.getColumnPos(2));
   1942         assertEquals("8 key fix 5 L0 [4]", 3, params.getColumnPos(3));
   1943         assertEquals("8 key fix 5 L0 [5]", 4, params.getColumnPos(4));
   1944         assertEquals("8 key fix 5 L0 [6]", 0, params.getColumnPos(5));
   1945         assertEquals("8 key fix 5 L0 [7]", 1, params.getColumnPos(6));
   1946         assertEquals("8 key fix 5 L0 [8]", 2, params.getColumnPos(7));
   1947         assertEquals("8 key fix 5 L0 adjust", 0, params.mTopRowAdjustment);
   1948         assertEquals("8 key fix 5 L0 default", WIDTH * 0, params.getDefaultKeyCoordX());
   1949     }
   1950 
   1951     // |___ [6] [7] [8]
   1952     // |___ <1> [2] [3] [4] [5]
   1953     public void testLayout8KeyFix5L1() {
   1954         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_L1);
   1955         assertEquals("8 key fix 5 L1 columns", 5, params.mNumColumns);
   1956         assertEquals("8 key fix 5 L1 rows", 2, params.mNumRows);
   1957         assertEquals("8 key fix 5 L1 left", 0, params.mLeftKeys);
   1958         assertEquals("8 key fix 5 L1 right", 5, params.mRightKeys);
   1959         assertEquals("8 key fix 5 L1 <1>", 0, params.getColumnPos(0));
   1960         assertEquals("8 key fix 5 L1 [2]", 1, params.getColumnPos(1));
   1961         assertEquals("8 key fix 5 L1 [3]", 2, params.getColumnPos(2));
   1962         assertEquals("8 key fix 5 L1 [4]", 3, params.getColumnPos(3));
   1963         assertEquals("8 key fix 5 L1 [5]", 4, params.getColumnPos(4));
   1964         assertEquals("8 key fix 5 L1 [6]", 0, params.getColumnPos(5));
   1965         assertEquals("8 key fix 5 L1 [7]", 1, params.getColumnPos(6));
   1966         assertEquals("8 key fix 5 L1 [8]", 2, params.getColumnPos(7));
   1967         assertEquals("8 key fix 5 L1 adjust", 0, params.mTopRowAdjustment);
   1968         assertEquals("8 key fix 5 L1 default", WIDTH * 0, params.getDefaultKeyCoordX());
   1969     }
   1970 
   1971     // |___ [6] [7] [8]
   1972     // |___ [1] <2> [3] [4] [5]
   1973     public void testLayout8KeyFix5L2() {
   1974         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_L2);
   1975         assertEquals("8 key fix 5 L2 columns", 5, params.mNumColumns);
   1976         assertEquals("8 key fix 5 L2 rows", 2, params.mNumRows);
   1977         assertEquals("8 key fix 5 L2 left", 1, params.mLeftKeys);
   1978         assertEquals("8 key fix 5 L2 right", 4, params.mRightKeys);
   1979         assertEquals("8 key fix 5 L2 [1]", -1, params.getColumnPos(0));
   1980         assertEquals("8 key fix 5 L2 <2>", 0, params.getColumnPos(1));
   1981         assertEquals("8 key fix 5 L2 [3]", 1, params.getColumnPos(2));
   1982         assertEquals("8 key fix 5 L2 [4]", 2, params.getColumnPos(3));
   1983         assertEquals("8 key fix 5 L2 [5]", 3, params.getColumnPos(4));
   1984         assertEquals("8 key fix 5 L2 [6]", -1, params.getColumnPos(5));
   1985         assertEquals("8 key fix 5 L2 [7]", 0, params.getColumnPos(6));
   1986         assertEquals("8 key fix 5 L2 [8]", 1, params.getColumnPos(7));
   1987         assertEquals("8 key fix 5 L2 adjust", 0, params.mTopRowAdjustment);
   1988         assertEquals("8 key fix 5 L2 default", WIDTH * 1, params.getDefaultKeyCoordX());
   1989     }
   1990 
   1991     //         [6] [7] [8]|
   1992     // [1] [2] [3] [4] <5>|
   1993     public void testLayout8KeyFix5R0() {
   1994         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_R0);
   1995         assertEquals("8 key fix 5 R0 columns", 5, params.mNumColumns);
   1996         assertEquals("8 key fix 5 R0 rows", 2, params.mNumRows);
   1997         assertEquals("8 key fix 5 R0 left", 4, params.mLeftKeys);
   1998         assertEquals("8 key fix 5 R0 right", 1, params.mRightKeys);
   1999         assertEquals("8 key fix 5 R0 [1]", -4, params.getColumnPos(0));
   2000         assertEquals("8 key fix 5 R0 [2]", -3, params.getColumnPos(1));
   2001         assertEquals("8 key fix 5 R0 [3]", -2, params.getColumnPos(2));
   2002         assertEquals("8 key fix 5 R0 [4]", -1, params.getColumnPos(3));
   2003         assertEquals("8 key fix 5 R0 <5>", 0, params.getColumnPos(4));
   2004         assertEquals("8 key fix 5 R0 [6]", -2, params.getColumnPos(5));
   2005         assertEquals("8 key fix 5 R0 [7]", -1, params.getColumnPos(6));
   2006         assertEquals("8 key fix 5 R0 [8]", 0, params.getColumnPos(7));
   2007         assertEquals("8 key fix 5 R0 adjust", 0, params.mTopRowAdjustment);
   2008         assertEquals("8 key fix 5 R0 default", WIDTH * 4, params.getDefaultKeyCoordX());
   2009     }
   2010 
   2011     //         [6] [7] [8] ___|
   2012     // [1] [2] [3] [4] <5> ___|
   2013     public void testLayout8KeyFix5R1() {
   2014         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_R1);
   2015         assertEquals("8 key fix 5 R1 columns", 5, params.mNumColumns);
   2016         assertEquals("8 key fix 5 R1 rows", 2, params.mNumRows);
   2017         assertEquals("8 key fix 5 R1 left", 4, params.mLeftKeys);
   2018         assertEquals("8 key fix 5 R1 right", 1, params.mRightKeys);
   2019         assertEquals("8 key fix 5 R1 [1]", -4, params.getColumnPos(0));
   2020         assertEquals("8 key fix 5 R1 [2]", -3, params.getColumnPos(1));
   2021         assertEquals("8 key fix 5 R1 [3]", -2, params.getColumnPos(2));
   2022         assertEquals("8 key fix 5 R1 [4]", -1, params.getColumnPos(3));
   2023         assertEquals("8 key fix 5 R1 <5>", 0, params.getColumnPos(4));
   2024         assertEquals("8 key fix 5 R1 [6]", -2, params.getColumnPos(5));
   2025         assertEquals("8 key fix 5 R1 [7]", -1, params.getColumnPos(6));
   2026         assertEquals("8 key fix 5 R1 [8]", 0, params.getColumnPos(7));
   2027         assertEquals("8 key fix 5 R1 adjust", 0, params.mTopRowAdjustment);
   2028         assertEquals("8 key fix 5 R1 default", WIDTH * 4, params.getDefaultKeyCoordX());
   2029     }
   2030 
   2031     //         [6] [7] [8] ___|
   2032     // [1] [2] [3] <4> [5] ___|
   2033     public void testLayout8KeyFix5R2() {
   2034         MoreKeysKeyboardParams params = createParams(8, 5, XPOS_R2);
   2035         assertEquals("8 key fix 5 R2 columns", 5, params.mNumColumns);
   2036         assertEquals("8 key fix 5 R2 rows", 2, params.mNumRows);
   2037         assertEquals("8 key fix 5 R2 left", 3, params.mLeftKeys);
   2038         assertEquals("8 key fix 5 R2 right", 2, params.mRightKeys);
   2039         assertEquals("8 key fix 5 R2 [1]", -3, params.getColumnPos(0));
   2040         assertEquals("8 key fix 5 R2 [2]", -2, params.getColumnPos(1));
   2041         assertEquals("8 key fix 5 R2 [3]", -1, params.getColumnPos(2));
   2042         assertEquals("8 key fix 5 R2 <4>", 0, params.getColumnPos(3));
   2043         assertEquals("8 key fix 5 R2 [5]", 1, params.getColumnPos(4));
   2044         assertEquals("8 key fix 5 R2 [6]", -1, params.getColumnPos(5));
   2045         assertEquals("8 key fix 5 R2 [7]", 0, params.getColumnPos(6));
   2046         assertEquals("8 key fix 5 R2 [8]", 1, params.getColumnPos(7));
   2047         assertEquals("8 key fix 5 R2 adjust", 0, params.mTopRowAdjustment);
   2048         assertEquals("8 key fix 5 R2 default", WIDTH * 3, params.getDefaultKeyCoordX());
   2049     }
   2050 
   2051     //   [6] [7] [8] [9]
   2052     // [1] [2] <3> [4] [5]
   2053     public void testLayout9KeyFix5M0() {
   2054         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_M0);
   2055         assertEquals("9 key fix 5 M0 columns", 5, params.mNumColumns);
   2056         assertEquals("9 key fix 5 M0 rows", 2, params.mNumRows);
   2057         assertEquals("9 key fix 5 M0 left", 2, params.mLeftKeys);
   2058         assertEquals("9 key fix 5 M0 right", 3, params.mRightKeys);
   2059         assertEquals("9 key fix 5 M0 [1]", -2, params.getColumnPos(0));
   2060         assertEquals("9 key fix 5 M0 [2]", -1, params.getColumnPos(1));
   2061         assertEquals("9 key fix 5 M0 <3>", 0, params.getColumnPos(2));
   2062         assertEquals("9 key fix 5 M0 [4]", 1, params.getColumnPos(3));
   2063         assertEquals("9 key fix 5 M0 [5]", 2, params.getColumnPos(4));
   2064         assertEquals("9 key fix 5 M0 [6]", -1, params.getColumnPos(5));
   2065         assertEquals("9 key fix 5 M0 [7]", 0, params.getColumnPos(6));
   2066         assertEquals("9 key fix 5 M0 [8]", 1, params.getColumnPos(7));
   2067         assertEquals("9 key fix 5 M0 [9]", 2, params.getColumnPos(8));
   2068         assertEquals("9 key fix 5 M0 adjust", -1, params.mTopRowAdjustment);
   2069         assertEquals("9 key fix 5 M0 default", WIDTH * 2, params.getDefaultKeyCoordX());
   2070     }
   2071 
   2072     // |[6] [7] [8] [9]
   2073     // |<1> [2] [3] [4] [5]
   2074     public void testLayout9KeyFix5L0() {
   2075         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_L0);
   2076         assertEquals("9 key fix 5 L0 columns", 5, params.mNumColumns);
   2077         assertEquals("9 key fix 5 L0 rows", 2, params.mNumRows);
   2078         assertEquals("9 key fix 5 L0 left", 0, params.mLeftKeys);
   2079         assertEquals("9 key fix 5 L0 right", 5, params.mRightKeys);
   2080         assertEquals("9 key fix 5 L0 <1>", 0, params.getColumnPos(0));
   2081         assertEquals("9 key fix 5 L0 [2]", 1, params.getColumnPos(1));
   2082         assertEquals("9 key fix 5 L0 [3]", 2, params.getColumnPos(2));
   2083         assertEquals("9 key fix 5 L0 [4]", 3, params.getColumnPos(3));
   2084         assertEquals("9 key fix 5 L0 [5]", 4, params.getColumnPos(4));
   2085         assertEquals("9 key fix 5 L0 [6]", 0, params.getColumnPos(5));
   2086         assertEquals("9 key fix 5 L0 [7]", 1, params.getColumnPos(6));
   2087         assertEquals("9 key fix 5 L0 [8]", 2, params.getColumnPos(7));
   2088         assertEquals("9 key fix 5 L0 [9]", 3, params.getColumnPos(8));
   2089         assertEquals("9 key fix 5 L0 adjust", 0, params.mTopRowAdjustment);
   2090         assertEquals("9 key fix 5 L0 default", WIDTH * 0, params.getDefaultKeyCoordX());
   2091     }
   2092 
   2093     // |___ [6] [7] [8] [9]
   2094     // |___ <1> [2] [3] [4] [5]
   2095     public void testLayout9KeyFix5L1() {
   2096         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_L1);
   2097         assertEquals("9 key fix 5 L1 columns", 5, params.mNumColumns);
   2098         assertEquals("9 key fix 5 L1 rows", 2, params.mNumRows);
   2099         assertEquals("9 key fix 5 L1 left", 0, params.mLeftKeys);
   2100         assertEquals("9 key fix 5 L1 right", 5, params.mRightKeys);
   2101         assertEquals("9 key fix 5 L1 <1>", 0, params.getColumnPos(0));
   2102         assertEquals("9 key fix 5 L1 [2]", 1, params.getColumnPos(1));
   2103         assertEquals("9 key fix 5 L1 [3]", 2, params.getColumnPos(2));
   2104         assertEquals("9 key fix 5 L1 [4]", 3, params.getColumnPos(3));
   2105         assertEquals("9 key fix 5 L1 [5]", 4, params.getColumnPos(4));
   2106         assertEquals("9 key fix 5 L1 [6]", 0, params.getColumnPos(5));
   2107         assertEquals("9 key fix 5 L1 [7]", 1, params.getColumnPos(6));
   2108         assertEquals("9 key fix 5 L1 [8]", 2, params.getColumnPos(7));
   2109         assertEquals("9 key fix 5 L1 [9]", 3, params.getColumnPos(8));
   2110         assertEquals("9 key fix 5 L1 adjust",0, params.mTopRowAdjustment);
   2111         assertEquals("9 key fix 5 L1 default", WIDTH * 0, params.getDefaultKeyCoordX());
   2112     }
   2113 
   2114     // |___   [6] [7] [8] [9]
   2115     // |___ [1] <2> [3] [4] [5]
   2116     public void testLayout9KeyFix5L2() {
   2117         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_L2);
   2118         assertEquals("9 key fix 5 L2 columns", 5, params.mNumColumns);
   2119         assertEquals("9 key fix 5 L2 rows", 2, params.mNumRows);
   2120         assertEquals("9 key fix 5 L2 left", 1, params.mLeftKeys);
   2121         assertEquals("9 key fix 5 L2 right", 4, params.mRightKeys);
   2122         assertEquals("9 key fix 5 L2 [1]", -1, params.getColumnPos(0));
   2123         assertEquals("9 key fix 5 L2 <2>", 0, params.getColumnPos(1));
   2124         assertEquals("9 key fix 5 L2 [3]", 1, params.getColumnPos(2));
   2125         assertEquals("9 key fix 5 L2 [4]", 2, params.getColumnPos(3));
   2126         assertEquals("9 key fix 5 L2 [5]", 3, params.getColumnPos(4));
   2127         assertEquals("9 key fix 5 L2 [6]", 0, params.getColumnPos(5));
   2128         assertEquals("9 key fix 5 L2 [7]", 1, params.getColumnPos(6));
   2129         assertEquals("9 key fix 5 L2 [8]", 2, params.getColumnPos(7));
   2130         assertEquals("9 key fix 5 L2 [9]", 3, params.getColumnPos(8));
   2131         assertEquals("9 key fix 5 L2 adjust", -1, params.mTopRowAdjustment);
   2132         assertEquals("9 key fix 5 L2 default", WIDTH * 1, params.getDefaultKeyCoordX());
   2133     }
   2134 
   2135     //     [6] [7] [8] [9]|
   2136     // [1] [2] [3] [4] <5>|
   2137     public void testLayout9KeyFix5R0() {
   2138         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_R0);
   2139         assertEquals("9 key fix 5 R0 columns", 5, params.mNumColumns);
   2140         assertEquals("9 key fix 5 R0 rows", 2, params.mNumRows);
   2141         assertEquals("9 key fix 5 R0 left", 4, params.mLeftKeys);
   2142         assertEquals("9 key fix 5 R0 right", 1, params.mRightKeys);
   2143         assertEquals("9 key fix 5 R0 [1]", -4, params.getColumnPos(0));
   2144         assertEquals("9 key fix 5 R0 [2]", -3, params.getColumnPos(1));
   2145         assertEquals("9 key fix 5 R0 [3]", -2, params.getColumnPos(2));
   2146         assertEquals("9 key fix 5 R0 [4]", -1, params.getColumnPos(3));
   2147         assertEquals("9 key fix 5 R0 <5>", 0, params.getColumnPos(4));
   2148         assertEquals("9 key fix 5 R0 [6]", -3, params.getColumnPos(5));
   2149         assertEquals("9 key fix 5 R0 [7]", -2, params.getColumnPos(6));
   2150         assertEquals("9 key fix 5 R0 [8]", -1, params.getColumnPos(7));
   2151         assertEquals("9 key fix 5 R0 [9]", 0, params.getColumnPos(8));
   2152         assertEquals("9 key fix 5 R0 adjust", 0, params.mTopRowAdjustment);
   2153         assertEquals("9 key fix 5 R0 default", WIDTH * 4, params.getDefaultKeyCoordX());
   2154     }
   2155 
   2156     //     [6] [7] [8] [9] ___|
   2157     // [1] [2] [3] [4] <5> ___|
   2158     public void testLayout9KeyFix5R1() {
   2159         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_R1);
   2160         assertEquals("9 key fix 5 R1 columns", 5, params.mNumColumns);
   2161         assertEquals("9 key fix 5 R1 rows", 2, params.mNumRows);
   2162         assertEquals("9 key fix 5 R1 left", 4, params.mLeftKeys);
   2163         assertEquals("9 key fix 5 R1 right", 1, params.mRightKeys);
   2164         assertEquals("9 key fix 5 R1 [1]", -4, params.getColumnPos(0));
   2165         assertEquals("9 key fix 5 R1 [2]", -3, params.getColumnPos(1));
   2166         assertEquals("9 key fix 5 R1 [3]", -2, params.getColumnPos(2));
   2167         assertEquals("9 key fix 5 R1 [4]", -1, params.getColumnPos(3));
   2168         assertEquals("9 key fix 5 R1 <5>", 0, params.getColumnPos(4));
   2169         assertEquals("9 key fix 5 R1 [6]", -3, params.getColumnPos(5));
   2170         assertEquals("9 key fix 5 R1 [7]", -2, params.getColumnPos(6));
   2171         assertEquals("9 key fix 5 R1 [8]", -1, params.getColumnPos(7));
   2172         assertEquals("9 key fix 5 R1 [9]", 0, params.getColumnPos(8));
   2173         assertEquals("9 key fix 5 R1 adjust", 0, params.mTopRowAdjustment);
   2174         assertEquals("9 key fix 5 R1 default", WIDTH * 4, params.getDefaultKeyCoordX());
   2175     }
   2176 
   2177     //   [6] [7] [8] [9]  ___|
   2178     // [1] [2] [3] <4> [5] ___|
   2179     public void testLayout9KeyFix5R2() {
   2180         MoreKeysKeyboardParams params = createParams(9, 5, XPOS_R2);
   2181         assertEquals("9 key fix 5 R2 columns", 5, params.mNumColumns);
   2182         assertEquals("9 key fix 5 R2 rows", 2, params.mNumRows);
   2183         assertEquals("9 key fix 5 R2 left", 3, params.mLeftKeys);
   2184         assertEquals("9 key fix 5 R2 right", 2, params.mRightKeys);
   2185         assertEquals("9 key fix 5 R2 [1]", -3, params.getColumnPos(0));
   2186         assertEquals("9 key fix 5 R2 [2]", -2, params.getColumnPos(1));
   2187         assertEquals("9 key fix 5 R2 [3]", -1, params.getColumnPos(2));
   2188         assertEquals("9 key fix 5 R2 <4>", 0, params.getColumnPos(3));
   2189         assertEquals("9 key fix 5 R2 [5]", 1, params.getColumnPos(4));
   2190         assertEquals("9 key fix 5 R2 [6]", -2, params.getColumnPos(5));
   2191         assertEquals("9 key fix 5 R2 [7]", -1, params.getColumnPos(6));
   2192         assertEquals("9 key fix 5 R2 [8]", 0, params.getColumnPos(7));
   2193         assertEquals("9 key fix 5 R2 [9]", 1, params.getColumnPos(8));
   2194         assertEquals("9 key fix 5 R2 adjust", -1, params.mTopRowAdjustment);
   2195         assertEquals("9 key fix 5 R2 default", WIDTH * 3, params.getDefaultKeyCoordX());
   2196     }
   2197 
   2198     // [6] [7] [8] [9] [A]
   2199     // [1] [2] <3> [4] [5]
   2200     public void testLayout10KeyFix5M0() {
   2201         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_M0);
   2202         assertEquals("10 key fix 5 M0 columns", 5, params.mNumColumns);
   2203         assertEquals("10 key fix 5 M0 rows", 2, params.mNumRows);
   2204         assertEquals("10 key fix 5 M0 left", 2, params.mLeftKeys);
   2205         assertEquals("10 key fix 5 M0 right", 3, params.mRightKeys);
   2206         assertEquals("10 key fix 5 M0 [1]", -2, params.getColumnPos(0));
   2207         assertEquals("10 key fix 5 M0 [2]", -1, params.getColumnPos(1));
   2208         assertEquals("10 key fix 5 M0 <3>", 0, params.getColumnPos(2));
   2209         assertEquals("10 key fix 5 M0 [4]", 1, params.getColumnPos(3));
   2210         assertEquals("10 key fix 5 M0 [5]", 2, params.getColumnPos(4));
   2211         assertEquals("10 key fix 5 M0 [6]", -2, params.getColumnPos(5));
   2212         assertEquals("10 key fix 5 M0 [7]", -1, params.getColumnPos(6));
   2213         assertEquals("10 key fix 5 M0 [8]", 0, params.getColumnPos(7));
   2214         assertEquals("10 key fix 5 M0 [9]", 1, params.getColumnPos(8));
   2215         assertEquals("10 key fix 5 M0 [A]", 2, params.getColumnPos(9));
   2216         assertEquals("10 key fix 5 M0 adjust", 0, params.mTopRowAdjustment);
   2217         assertEquals("10 key fix 5 M0 default", WIDTH * 2, params.getDefaultKeyCoordX());
   2218     }
   2219 
   2220     // |[6] [7] [8] [9] [A]
   2221     // |<1> [2] [3] [4] [5]
   2222     public void testLayout10KeyFix5L0() {
   2223         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_L0);
   2224         assertEquals("10 key fix 5 L0 columns", 5, params.mNumColumns);
   2225         assertEquals("10 key fix 5 L0 rows", 2, params.mNumRows);
   2226         assertEquals("10 key fix 5 L0 left", 0, params.mLeftKeys);
   2227         assertEquals("10 key fix 5 L0 right", 5, params.mRightKeys);
   2228         assertEquals("10 key fix 5 L0 <1>", 0, params.getColumnPos(0));
   2229         assertEquals("10 key fix 5 L0 [2]", 1, params.getColumnPos(1));
   2230         assertEquals("10 key fix 5 L0 [3]", 2, params.getColumnPos(2));
   2231         assertEquals("10 key fix 5 L0 [4]", 3, params.getColumnPos(3));
   2232         assertEquals("10 key fix 5 L0 [5]", 4, params.getColumnPos(4));
   2233         assertEquals("10 key fix 5 L0 [6]", 0, params.getColumnPos(5));
   2234         assertEquals("10 key fix 5 L0 [7]", 1, params.getColumnPos(6));
   2235         assertEquals("10 key fix 5 L0 [8]", 2, params.getColumnPos(7));
   2236         assertEquals("10 key fix 5 L0 [9]", 3, params.getColumnPos(8));
   2237         assertEquals("10 key fix 5 L0 [A]", 4, params.getColumnPos(9));
   2238         assertEquals("10 key fix 5 L0 adjust", 0, params.mTopRowAdjustment);
   2239         assertEquals("10 key fix 5 L0 default", WIDTH * 0, params.getDefaultKeyCoordX());
   2240     }
   2241 
   2242     // |___ [6] [7] [8] [9] [A]
   2243     // |___ <1> [2] [3] [4] [5]
   2244     public void testLayout10KeyFix5L1() {
   2245         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_L1);
   2246         assertEquals("10 key fix 5 L1 columns", 5, params.mNumColumns);
   2247         assertEquals("10 key fix 5 L1 rows", 2, params.mNumRows);
   2248         assertEquals("10 key fix 5 L1 left", 0, params.mLeftKeys);
   2249         assertEquals("10 key fix 5 L1 right", 5, params.mRightKeys);
   2250         assertEquals("10 key fix 5 L1 <1>", 0, params.getColumnPos(0));
   2251         assertEquals("10 key fix 5 L1 [2]", 1, params.getColumnPos(1));
   2252         assertEquals("10 key fix 5 L1 [3]", 2, params.getColumnPos(2));
   2253         assertEquals("10 key fix 5 L1 [4]", 3, params.getColumnPos(3));
   2254         assertEquals("10 key fix 5 L1 [5]", 4, params.getColumnPos(4));
   2255         assertEquals("10 key fix 5 L1 [6]", 0, params.getColumnPos(5));
   2256         assertEquals("10 key fix 5 L1 [7]", 1, params.getColumnPos(6));
   2257         assertEquals("10 key fix 5 L1 [8]", 2, params.getColumnPos(7));
   2258         assertEquals("10 key fix 5 L1 [9]", 3, params.getColumnPos(8));
   2259         assertEquals("10 key fix 5 L1 [A]", 4, params.getColumnPos(9));
   2260         assertEquals("10 key fix 5 L1 adjust", 0, params.mTopRowAdjustment);
   2261         assertEquals("10 key fix 5 L1 default", WIDTH * 0, params.getDefaultKeyCoordX());
   2262     }
   2263 
   2264     // |___ [6] [7] [8] [9] [A]
   2265     // |___ [1] <2> [3] [4] [5]
   2266     public void testLayout10KeyFix5L2() {
   2267         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_L2);
   2268         assertEquals("10 key fix 5 L2 columns", 5, params.mNumColumns);
   2269         assertEquals("10 key fix 5 L2 rows", 2, params.mNumRows);
   2270         assertEquals("10 key fix 5 L2 left", 1, params.mLeftKeys);
   2271         assertEquals("10 key fix 5 L2 right", 4, params.mRightKeys);
   2272         assertEquals("10 key fix 5 L2 [1]", -1, params.getColumnPos(0));
   2273         assertEquals("10 key fix 5 L2 <2>", 0, params.getColumnPos(1));
   2274         assertEquals("10 key fix 5 L2 [3]", 1, params.getColumnPos(2));
   2275         assertEquals("10 key fix 5 L2 [4]", 2, params.getColumnPos(3));
   2276         assertEquals("10 key fix 5 L2 [5]", 3, params.getColumnPos(4));
   2277         assertEquals("10 key fix 5 L2 [6]", -1, params.getColumnPos(5));
   2278         assertEquals("10 key fix 5 L2 [7]", 0, params.getColumnPos(6));
   2279         assertEquals("10 key fix 5 L2 [8]", 1, params.getColumnPos(7));
   2280         assertEquals("10 key fix 5 L2 [9]", 2, params.getColumnPos(8));
   2281         assertEquals("10 key fix 5 L2 [A]", 3, params.getColumnPos(9));
   2282         assertEquals("10 key fix 5 L2 adjust", 0, params.mTopRowAdjustment);
   2283         assertEquals("10 key fix 5 L2 default", WIDTH * 1, params.getDefaultKeyCoordX());
   2284     }
   2285 
   2286     // [6] [7] [8] [9] [A]|
   2287     // [1] [2] [3] [4] <5>|
   2288     public void testLayout10KeyFix5R0() {
   2289         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_R0);
   2290         assertEquals("10 key fix 5 R0 columns", 5, params.mNumColumns);
   2291         assertEquals("10 key fix 5 R0 rows", 2, params.mNumRows);
   2292         assertEquals("10 key fix 5 R0 left", 4, params.mLeftKeys);
   2293         assertEquals("10 key fix 5 R0 right", 1, params.mRightKeys);
   2294         assertEquals("10 key fix 5 R0 [1]", -4, params.getColumnPos(0));
   2295         assertEquals("10 key fix 5 R0 [2]", -3, params.getColumnPos(1));
   2296         assertEquals("10 key fix 5 R0 [3]", -2, params.getColumnPos(2));
   2297         assertEquals("10 key fix 5 R0 [4]", -1, params.getColumnPos(3));
   2298         assertEquals("10 key fix 5 R0 <5>", 0, params.getColumnPos(4));
   2299         assertEquals("10 key fix 5 R0 [6]", -4, params.getColumnPos(5));
   2300         assertEquals("10 key fix 5 R0 [7]", -3, params.getColumnPos(6));
   2301         assertEquals("10 key fix 5 R0 [8]", -2, params.getColumnPos(7));
   2302         assertEquals("10 key fix 5 R0 [9]", -1, params.getColumnPos(8));
   2303         assertEquals("10 key fix 5 R0 [A]", 0, params.getColumnPos(9));
   2304         assertEquals("10 key fix 5 R0 adjust", 0, params.mTopRowAdjustment);
   2305         assertEquals("10 key fix 5 R0 default", WIDTH * 4, params.getDefaultKeyCoordX());
   2306     }
   2307 
   2308     // [6] [7] [8] [9] [A] ___|
   2309     // [1] [2] [3] [4] <5> ___|
   2310     public void testLayout10KeyFix5R1() {
   2311         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_R1);
   2312         assertEquals("10 key fix 5 R1 columns", 5, params.mNumColumns);
   2313         assertEquals("10 key fix 5 R1 rows", 2, params.mNumRows);
   2314         assertEquals("10 key fix 5 R1 left", 4, params.mLeftKeys);
   2315         assertEquals("10 key fix 5 R1 right", 1, params.mRightKeys);
   2316         assertEquals("10 key fix 5 R1 [1]", -4, params.getColumnPos(0));
   2317         assertEquals("10 key fix 5 R1 [2]", -3, params.getColumnPos(1));
   2318         assertEquals("10 key fix 5 R1 [3]", -2, params.getColumnPos(2));
   2319         assertEquals("10 key fix 5 R1 [4]", -1, params.getColumnPos(3));
   2320         assertEquals("10 key fix 5 R1 <5>", 0, params.getColumnPos(4));
   2321         assertEquals("10 key fix 5 R1 [6]", -4, params.getColumnPos(5));
   2322         assertEquals("10 key fix 5 R1 [7]", -3, params.getColumnPos(6));
   2323         assertEquals("10 key fix 5 R1 [8]", -2, params.getColumnPos(7));
   2324         assertEquals("10 key fix 5 R1 [9]", -1, params.getColumnPos(8));
   2325         assertEquals("10 key fix 5 R1 [A]", 0, params.getColumnPos(9));
   2326         assertEquals("10 key fix 5 R1 adjust", 0, params.mTopRowAdjustment);
   2327         assertEquals("10 key fix 5 R1 default", WIDTH * 4, params.getDefaultKeyCoordX());
   2328     }
   2329 
   2330     // [6] [7] [8] [9] [A] ___|
   2331     // [1] [2] [3] <4> [5] ___|
   2332     public void testLayout10KeyFix5R2() {
   2333         MoreKeysKeyboardParams params = createParams(10, 5, XPOS_R2);
   2334         assertEquals("10 key fix 5 R2 columns", 5, params.mNumColumns);
   2335         assertEquals("10 key fix 5 R2 rows", 2, params.mNumRows);
   2336         assertEquals("10 key fix 5 R2 left", 3, params.mLeftKeys);
   2337         assertEquals("10 key fix 5 R2 right", 2, params.mRightKeys);
   2338         assertEquals("10 key fix 5 R2 [1]", -3, params.getColumnPos(0));
   2339         assertEquals("10 key fix 5 R2 [2]", -2, params.getColumnPos(1));
   2340         assertEquals("10 key fix 5 R2 [3]", -1, params.getColumnPos(2));
   2341         assertEquals("10 key fix 5 R2 <4>", 0, params.getColumnPos(3));
   2342         assertEquals("10 key fix 5 R2 [5]", 1, params.getColumnPos(4));
   2343         assertEquals("10 key fix 5 R2 [6]", -3, params.getColumnPos(5));
   2344         assertEquals("10 key fix 5 R2 [7]", -2, params.getColumnPos(6));
   2345         assertEquals("10 key fix 5 R2 [8]", -1, params.getColumnPos(7));
   2346         assertEquals("10 key fix 5 R2 [9]", 0, params.getColumnPos(8));
   2347         assertEquals("10 key fix 5 R2 [A]", 1, params.getColumnPos(9));
   2348         assertEquals("10 key fix 5 R2 adjust", 0, params.mTopRowAdjustment);
   2349         assertEquals("10 key fix 5 R2 default", WIDTH * 3, params.getDefaultKeyCoordX());
   2350     }
   2351 
   2352     //         [B]
   2353     // [6] [7] [8] [9] [A]
   2354     // [1] [2] <3> [4] [5]
   2355     public void testLayout11KeyFix5M0() {
   2356         MoreKeysKeyboardParams params = createParams(11, 5, XPOS_M0);
   2357         assertEquals("11 key fix 5 M0 columns", 5, params.mNumColumns);
   2358         assertEquals("11 key fix 5 M0 rows", 3, params.mNumRows);
   2359         assertEquals("11 key fix 5 M0 left", 2, params.mLeftKeys);
   2360         assertEquals("11 key fix 5 M0 right", 3, params.mRightKeys);
   2361         assertEquals("11 key fix 5 M0 [1]", -2, params.getColumnPos(0));
   2362         assertEquals("11 key fix 5 M0 [2]", -1, params.getColumnPos(1));
   2363         assertEquals("11 key fix 5 M0 <3>", 0, params.getColumnPos(2));
   2364         assertEquals("11 key fix 5 M0 [4]", 1, params.getColumnPos(3));
   2365         assertEquals("11 key fix 5 M0 [5]", 2, params.getColumnPos(4));
   2366         assertEquals("11 key fix 5 M0 [6]", -2, params.getColumnPos(5));
   2367         assertEquals("11 key fix 5 M0 [7]", -1, params.getColumnPos(6));
   2368         assertEquals("11 key fix 5 M0 [8]", 0, params.getColumnPos(7));
   2369         assertEquals("11 key fix 5 M0 [9]", 1, params.getColumnPos(8));
   2370         assertEquals("11 key fix 5 M0 [A]", 2, params.getColumnPos(9));
   2371         assertEquals("11 key fix 5 M0 [B]", 0, params.getColumnPos(10));
   2372         assertEquals("11 key fix 5 M0 adjust", 0, params.mTopRowAdjustment);
   2373         assertEquals("11 key fix 5 M0 default", WIDTH * 2, params.getDefaultKeyCoordX());
   2374     }
   2375 
   2376     //       [B] [C]
   2377     // [6] [7] [8] [9] [A]
   2378     // [1] [2] <3> [4] [5]
   2379     public void testLayout12KeyFix5M0() {
   2380         MoreKeysKeyboardParams params = createParams(12, 5, XPOS_M0);
   2381         assertEquals("12 key fix 5 M0 columns", 5, params.mNumColumns);
   2382         assertEquals("12 key fix 5 M0 rows", 3, params.mNumRows);
   2383         assertEquals("12 key fix 5 M0 left", 2, params.mLeftKeys);
   2384         assertEquals("12 key fix 5 M0 right", 3, params.mRightKeys);
   2385         assertEquals("12 key fix 5 M0 [1]", -2, params.getColumnPos(0));
   2386         assertEquals("12 key fix 5 M0 [2]", -1, params.getColumnPos(1));
   2387         assertEquals("12 key fix 5 M0 <3>", 0, params.getColumnPos(2));
   2388         assertEquals("12 key fix 5 M0 [4]", 1, params.getColumnPos(3));
   2389         assertEquals("12 key fix 5 M0 [5]", 2, params.getColumnPos(4));
   2390         assertEquals("12 key fix 5 M0 [6]", -2, params.getColumnPos(5));
   2391         assertEquals("12 key fix 5 M0 [7]", -1, params.getColumnPos(6));
   2392         assertEquals("12 key fix 5 M0 [8]", 0, params.getColumnPos(7));
   2393         assertEquals("12 key fix 5 M0 [9]", 1, params.getColumnPos(8));
   2394         assertEquals("12 key fix 5 M0 [A]", 2, params.getColumnPos(9));
   2395         assertEquals("12 key fix 5 M0 [B]", 0, params.getColumnPos(10));
   2396         assertEquals("12 key fix 5 M0 [C]", 1, params.getColumnPos(11));
   2397         assertEquals("12 key fix 5 M0 adjust", -1, params.mTopRowAdjustment);
   2398         assertEquals("12 key fix 5 M0 default", WIDTH * 2, params.getDefaultKeyCoordX());
   2399     }
   2400 
   2401     //     [B] [C] [D]
   2402     // [6] [7] [8] [9] [A]
   2403     // [1] [2] <3> [4] [5]
   2404     public void testLayout13KeyFix5M0() {
   2405         MoreKeysKeyboardParams params = createParams(13, 5, XPOS_M0);
   2406         assertEquals("13 key fix 5 M0 columns", 5, params.mNumColumns);
   2407         assertEquals("13 key fix 5 M0 rows", 3, params.mNumRows);
   2408         assertEquals("13 key fix 5 M0 left", 2, params.mLeftKeys);
   2409         assertEquals("13 key fix 5 M0 right", 3, params.mRightKeys);
   2410         assertEquals("13 key fix 5 M0 [1]", -2, params.getColumnPos(0));
   2411         assertEquals("13 key fix 5 M0 [2]", -1, params.getColumnPos(1));
   2412         assertEquals("13 key fix 5 M0 <3>", 0, params.getColumnPos(2));
   2413         assertEquals("13 key fix 5 M0 [4]", 1, params.getColumnPos(3));
   2414         assertEquals("13 key fix 5 M0 [5]", 2, params.getColumnPos(4));
   2415         assertEquals("13 key fix 5 M0 [6]", -2, params.getColumnPos(5));
   2416         assertEquals("13 key fix 5 M0 [7]", -1, params.getColumnPos(6));
   2417         assertEquals("13 key fix 5 M0 [8]", 0, params.getColumnPos(7));
   2418         assertEquals("13 key fix 5 M0 [9]", 1, params.getColumnPos(8));
   2419         assertEquals("13 key fix 5 M0 [A]", 2, params.getColumnPos(9));
   2420         assertEquals("13 key fix 5 M0 [B]", -1, params.getColumnPos(10));
   2421         assertEquals("13 key fix 5 M0 [C]", 0, params.getColumnPos(11));
   2422         assertEquals("13 key fix 5 M0 [D]", 1, params.getColumnPos(12));
   2423         assertEquals("13 key fix 5 M0 adjust", 0, params.mTopRowAdjustment);
   2424         assertEquals("13 key fix 5 M0 default", WIDTH * 2, params.getDefaultKeyCoordX());
   2425     }
   2426 
   2427     //   [B] [C] [D] [E]
   2428     // [6] [7] [8] [9] [A]
   2429     // [1] [2] <3> [4] [5]
   2430     public void testLayout14KeyFix5M0() {
   2431         MoreKeysKeyboardParams params = createParams(14, 5, XPOS_M0);
   2432         assertEquals("14 key fix 5 M0 columns", 5, params.mNumColumns);
   2433         assertEquals("14 key fix 5 M0 rows", 3, params.mNumRows);
   2434         assertEquals("14 key fix 5 M0 left", 2, params.mLeftKeys);
   2435         assertEquals("14 key fix 5 M0 right", 3, params.mRightKeys);
   2436         assertEquals("14 key fix 5 M0 [1]", -2, params.getColumnPos(0));
   2437         assertEquals("14 key fix 5 M0 [2]", -1, params.getColumnPos(1));
   2438         assertEquals("14 key fix 5 M0 <3>", 0, params.getColumnPos(2));
   2439         assertEquals("14 key fix 5 M0 [4]", 1, params.getColumnPos(3));
   2440         assertEquals("14 key fix 5 M0 [5]", 2, params.getColumnPos(4));
   2441         assertEquals("14 key fix 5 M0 [6]", -2, params.getColumnPos(5));
   2442         assertEquals("14 key fix 5 M0 [7]", -1, params.getColumnPos(6));
   2443         assertEquals("14 key fix 5 M0 [8]", 0, params.getColumnPos(7));
   2444         assertEquals("14 key fix 5 M0 [9]", 1, params.getColumnPos(8));
   2445         assertEquals("14 key fix 5 M0 [A]", 2, params.getColumnPos(9));
   2446         assertEquals("14 key fix 5 M0 [B]", -1, params.getColumnPos(10));
   2447         assertEquals("14 key fix 5 M0 [C]", 0, params.getColumnPos(11));
   2448         assertEquals("14 key fix 5 M0 [D]", 1, params.getColumnPos(12));
   2449         assertEquals("14 key fix 5 M0 [E]", 2, params.getColumnPos(13));
   2450         assertEquals("14 key fix 5 M0 adjust", -1, params.mTopRowAdjustment);
   2451         assertEquals("14 key fix 5 M0 default", WIDTH * 2, params.getDefaultKeyCoordX());
   2452     }
   2453 
   2454     // |<1> [2] [3] [4] [5] [6] [7]
   2455     public void testLayout7KeyFix7L0() {
   2456         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_L0);
   2457         assertEquals("7 key fix 7 L0 columns", 7, params.mNumColumns);
   2458         assertEquals("7 key fix 7 L0 rows", 1, params.mNumRows);
   2459         assertEquals("7 key fix 7 L0 left", 0, params.mLeftKeys);
   2460         assertEquals("7 key fix 7 L0 right", 7, params.mRightKeys);
   2461         assertEquals("7 key fix 7 L0 <1>", 0, params.getColumnPos(0));
   2462         assertEquals("7 key fix 7 L0 [2]", 1, params.getColumnPos(1));
   2463         assertEquals("7 key fix 7 L0 [3]", 2, params.getColumnPos(2));
   2464         assertEquals("7 key fix 7 L0 [4]", 3, params.getColumnPos(3));
   2465         assertEquals("7 key fix 7 L0 [5]", 4, params.getColumnPos(4));
   2466         assertEquals("7 key fix 7 L0 [6]", 5, params.getColumnPos(5));
   2467         assertEquals("7 key fix 7 L0 [7]", 6, params.getColumnPos(6));
   2468         assertEquals("7 key fix 7 L0 adjust", 0, params.mTopRowAdjustment);
   2469         assertEquals("7 key fix 7 L0 default", WIDTH * 0, params.getDefaultKeyCoordX());
   2470     }
   2471 
   2472     // |___ <1> [2] [3] [4] [5] [6] [7]
   2473     public void testLayout7KeyFix7L1() {
   2474         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_L1);
   2475         assertEquals("7 key fix 7 L1 columns", 7, params.mNumColumns);
   2476         assertEquals("7 key fix 7 L1 rows", 1, params.mNumRows);
   2477         assertEquals("7 key fix 7 L1 left", 0, params.mLeftKeys);
   2478         assertEquals("7 key fix 7 L1 right", 7, params.mRightKeys);
   2479         assertEquals("7 key fix 7 L1 <1>", 0, params.getColumnPos(0));
   2480         assertEquals("7 key fix 7 L1 [2]", 1, params.getColumnPos(1));
   2481         assertEquals("7 key fix 7 L1 [3]", 2, params.getColumnPos(2));
   2482         assertEquals("7 key fix 7 L1 [4]", 3, params.getColumnPos(3));
   2483         assertEquals("7 key fix 7 L1 [5]", 4, params.getColumnPos(4));
   2484         assertEquals("7 key fix 7 L1 [6]", 5, params.getColumnPos(5));
   2485         assertEquals("7 key fix 7 L1 [7]", 6, params.getColumnPos(6));
   2486         assertEquals("7 key fix 7 L1 adjust", 0, params.mTopRowAdjustment);
   2487         assertEquals("7 key fix 7 L1 default", WIDTH * 0, params.getDefaultKeyCoordX());
   2488     }
   2489 
   2490     // |___ [1] <2> [3] [4] [5] [6] [7]
   2491     public void testLayout7KeyFix7L2() {
   2492         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_L2);
   2493         assertEquals("7 key fix 7 L2 columns", 7, params.mNumColumns);
   2494         assertEquals("7 key fix 7 L2 rows", 1, params.mNumRows);
   2495         assertEquals("7 key fix 7 L2 left", 1, params.mLeftKeys);
   2496         assertEquals("7 key fix 7 L2 right", 6, params.mRightKeys);
   2497         assertEquals("7 key fix 7 L2 [1]", -1, params.getColumnPos(0));
   2498         assertEquals("7 key fix 7 L2 <2>", 0, params.getColumnPos(1));
   2499         assertEquals("7 key fix 7 L2 [3]", 1, params.getColumnPos(2));
   2500         assertEquals("7 key fix 7 L2 [4]", 2, params.getColumnPos(3));
   2501         assertEquals("7 key fix 7 L2 [5]", 3, params.getColumnPos(4));
   2502         assertEquals("7 key fix 7 L2 [6]", 4, params.getColumnPos(5));
   2503         assertEquals("7 key fix 7 L2 [7]", 5, params.getColumnPos(6));
   2504         assertEquals("7 key fix 7 L2 adjust", 0, params.mTopRowAdjustment);
   2505         assertEquals("7 key fix 7 L2 default", WIDTH * 1, params.getDefaultKeyCoordX());
   2506     }
   2507 
   2508     // |___ [1] [2] <3> [4] [5] [6] [7]
   2509     public void testLayout7KeyFix7L3() {
   2510         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_L3);
   2511         assertEquals("7 key fix 7 L3 columns", 7, params.mNumColumns);
   2512         assertEquals("7 key fix 7 L3 rows", 1, params.mNumRows);
   2513         assertEquals("7 key fix 7 L3 left", 2, params.mLeftKeys);
   2514         assertEquals("7 key fix 7 L3 right", 5, params.mRightKeys);
   2515         assertEquals("7 key fix 7 L3 [1]", -2, params.getColumnPos(0));
   2516         assertEquals("7 key fix 7 L3 [2]", -1, params.getColumnPos(1));
   2517         assertEquals("7 key fix 7 L3 <3>", 0, params.getColumnPos(2));
   2518         assertEquals("7 key fix 7 L3 [4]", 1, params.getColumnPos(3));
   2519         assertEquals("7 key fix 7 L3 [5]", 2, params.getColumnPos(4));
   2520         assertEquals("7 key fix 7 L3 [6]", 3, params.getColumnPos(5));
   2521         assertEquals("7 key fix 7 L3 [7]", 4, params.getColumnPos(6));
   2522         assertEquals("7 key fix 7 L3 adjust", 0, params.mTopRowAdjustment);
   2523         assertEquals("7 key fix 7 L3 default", WIDTH * 2, params.getDefaultKeyCoordX());
   2524     }
   2525 
   2526     // |___ [1] [2] [3] <4> [5] [6] [7] ___ ___|
   2527     public void testLayout7KeyFix7M0() {
   2528         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_M0);
   2529         assertEquals("7 key fix 7 M0 columns", 7, params.mNumColumns);
   2530         assertEquals("7 key fix 7 M0 rows", 1, params.mNumRows);
   2531         assertEquals("7 key fix 7 M0 left", 3, params.mLeftKeys);
   2532         assertEquals("7 key fix 7 M0 right", 4, params.mRightKeys);
   2533         assertEquals("7 key fix 7 M0 [1]", -3, params.getColumnPos(0));
   2534         assertEquals("7 key fix 7 M0 [2]", -2, params.getColumnPos(1));
   2535         assertEquals("7 key fix 7 M0 [3]", -1, params.getColumnPos(2));
   2536         assertEquals("7 key fix 7 M0 <4>", 0, params.getColumnPos(3));
   2537         assertEquals("7 key fix 7 M0 [5]", 1, params.getColumnPos(4));
   2538         assertEquals("7 key fix 7 M0 [6]", 2, params.getColumnPos(5));
   2539         assertEquals("7 key fix 7 M0 [7]", 3, params.getColumnPos(6));
   2540         assertEquals("7 key fix 7 M0 adjust", 0, params.mTopRowAdjustment);
   2541         assertEquals("7 key fix 7 M0 default", WIDTH * 3, params.getDefaultKeyCoordX());
   2542     }
   2543 
   2544     // |___ ___ [1] [2] [3] <4> [5] [6] [7] ___|
   2545     public void testLayout7KeyFix7M1() {
   2546         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_M1);
   2547         assertEquals("7 key fix 7 M1 columns", 7, params.mNumColumns);
   2548         assertEquals("7 key fix 7 M1 rows", 1, params.mNumRows);
   2549         assertEquals("7 key fix 7 M1 left", 3, params.mLeftKeys);
   2550         assertEquals("7 key fix 7 M1 right", 4, params.mRightKeys);
   2551         assertEquals("7 key fix 7 M1 [1]", -3, params.getColumnPos(0));
   2552         assertEquals("7 key fix 7 M1 [2]", -2, params.getColumnPos(1));
   2553         assertEquals("7 key fix 7 M1 [3]", -1, params.getColumnPos(2));
   2554         assertEquals("7 key fix 7 M1 <4>", 0, params.getColumnPos(3));
   2555         assertEquals("7 key fix 7 M1 [5]", 1, params.getColumnPos(4));
   2556         assertEquals("7 key fix 7 M1 [6]", 2, params.getColumnPos(5));
   2557         assertEquals("7 key fix 7 M1 [7]", 3, params.getColumnPos(6));
   2558         assertEquals("7 key fix 7 M1 adjust", 0, params.mTopRowAdjustment);
   2559         assertEquals("7 key fix 7 M1 default", WIDTH * 3, params.getDefaultKeyCoordX());
   2560     }
   2561 
   2562     // [1] [2] [3] [4] <5> [6] [7] ___|
   2563     public void testLayout7KeyFix7R3() {
   2564         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_R3);
   2565         assertEquals("7 key fix 7 R3 columns", 7, params.mNumColumns);
   2566         assertEquals("7 key fix 7 R3 rows", 1, params.mNumRows);
   2567         assertEquals("7 key fix 7 R3 left", 4, params.mLeftKeys);
   2568         assertEquals("7 key fix 7 R3 right", 3, params.mRightKeys);
   2569         assertEquals("7 key fix 7 R3 [1]", -4, params.getColumnPos(0));
   2570         assertEquals("7 key fix 7 R3 [2]", -3, params.getColumnPos(1));
   2571         assertEquals("7 key fix 7 R3 [3]", -2, params.getColumnPos(2));
   2572         assertEquals("7 key fix 7 R3 [4]", -1, params.getColumnPos(3));
   2573         assertEquals("7 key fix 7 R3 <5>", 0, params.getColumnPos(4));
   2574         assertEquals("7 key fix 7 R3 [6]", 1, params.getColumnPos(5));
   2575         assertEquals("7 key fix 7 R3 [7]", 2, params.getColumnPos(6));
   2576         assertEquals("7 key fix 7 R3 adjust", 0, params.mTopRowAdjustment);
   2577         assertEquals("7 key fix 7 R3 default", WIDTH * 4, params.getDefaultKeyCoordX());
   2578     }
   2579 
   2580     // [1] [2] [3] [4] [5] <6> [7] ___|
   2581     public void testLayout7KeyFix7R2() {
   2582         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_R2);
   2583         assertEquals("7 key fix 7 R2 columns", 7, params.mNumColumns);
   2584         assertEquals("7 key fix 7 R2 rows", 1, params.mNumRows);
   2585         assertEquals("7 key fix 7 R2 left", 5, params.mLeftKeys);
   2586         assertEquals("7 key fix 7 R2 right", 2, params.mRightKeys);
   2587         assertEquals("7 key fix 7 R2 [1]", -5, params.getColumnPos(0));
   2588         assertEquals("7 key fix 7 R2 [2]", -4, params.getColumnPos(1));
   2589         assertEquals("7 key fix 7 R2 [3]", -3, params.getColumnPos(2));
   2590         assertEquals("7 key fix 7 R2 [4]", -2, params.getColumnPos(3));
   2591         assertEquals("7 key fix 7 R2 [5]", -1, params.getColumnPos(4));
   2592         assertEquals("7 key fix 7 R2 <6>", 0, params.getColumnPos(5));
   2593         assertEquals("7 key fix 7 R2 [7]", 1, params.getColumnPos(6));
   2594         assertEquals("7 key fix 7 R2 adjust", 0, params.mTopRowAdjustment);
   2595         assertEquals("7 key fix 7 R2 default", WIDTH * 5, params.getDefaultKeyCoordX());
   2596     }
   2597 
   2598     // [1] [2] [3] [4] [5] [6] <7> ___|
   2599     public void testLayout7KeyFix7R1() {
   2600         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_R1);
   2601         assertEquals("7 key fix 7 R1 columns", 7, params.mNumColumns);
   2602         assertEquals("7 key fix 7 R1 rows", 1, params.mNumRows);
   2603         assertEquals("7 key fix 7 R1 left", 6, params.mLeftKeys);
   2604         assertEquals("7 key fix 7 R1 right", 1, params.mRightKeys);
   2605         assertEquals("7 key fix 7 R1 [1]", -6, params.getColumnPos(0));
   2606         assertEquals("7 key fix 7 R1 [2]", -5, params.getColumnPos(1));
   2607         assertEquals("7 key fix 7 R1 [3]", -4, params.getColumnPos(2));
   2608         assertEquals("7 key fix 7 R1 [4]", -3, params.getColumnPos(3));
   2609         assertEquals("7 key fix 7 R1 [5]", -2, params.getColumnPos(4));
   2610         assertEquals("7 key fix 7 R1 [6]", -1, params.getColumnPos(5));
   2611         assertEquals("7 key fix 7 R1 <7>", 0, params.getColumnPos(6));
   2612         assertEquals("7 key fix 7 R1 adjust", 0, params.mTopRowAdjustment);
   2613         assertEquals("7 key fix 7 R1 default", WIDTH * 6, params.getDefaultKeyCoordX());
   2614     }
   2615 
   2616     // [1] [2] [3] [4] [5] [6] <7>|
   2617     public void testLayout7KeyFix7R0() {
   2618         MoreKeysKeyboardParams params = createParams(7, 7, XPOS_R0);
   2619         assertEquals("7 key fix 7 R0 columns", 7, params.mNumColumns);
   2620         assertEquals("7 key fix 7 R0 rows", 1, params.mNumRows);
   2621         assertEquals("7 key fix 7 R0 left", 6, params.mLeftKeys);
   2622         assertEquals("7 key fix 7 R0 right", 1, params.mRightKeys);
   2623         assertEquals("7 key fix 7 R0 [1]", -6, params.getColumnPos(0));
   2624         assertEquals("7 key fix 7 R0 [2]", -5, params.getColumnPos(1));
   2625         assertEquals("7 key fix 7 R0 [3]", -4, params.getColumnPos(2));
   2626         assertEquals("7 key fix 7 R0 [4]", -3, params.getColumnPos(3));
   2627         assertEquals("7 key fix 7 R0 [5]", -2, params.getColumnPos(4));
   2628         assertEquals("7 key fix 7 R0 [6]", -1, params.getColumnPos(5));
   2629         assertEquals("7 key fix 7 R0 <7>", 0, params.getColumnPos(6));
   2630         assertEquals("7 key fix 7 R0 adjust", 0, params.mTopRowAdjustment);
   2631         assertEquals("7 key fix 7 R0 default", WIDTH * 6, params.getDefaultKeyCoordX());
   2632     }
   2633 }
   2634