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