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