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