Tighten unit test condition of MoreKeysKeyboardBuilder
Bug: 8601979 Change-Id: Icf584f3b35adce69cc3dfc46f3aacfef05e5dd2a
This commit is contained in:
parent
dc64866c70
commit
b12c2af32e
2 changed files with 8 additions and 8 deletions
|
@ -43,10 +43,10 @@ public class MoreKeysKeyboardBuilderFixedOrderTests extends AndroidTestCase {
|
|||
super.setUp();
|
||||
}
|
||||
|
||||
private static MoreKeysKeyboardParams createParams(int numKeys, int columnNum,
|
||||
int coordXInParnet) {
|
||||
private static MoreKeysKeyboardParams createParams(final int numKeys, final int columnNum,
|
||||
final int coordXInParent) {
|
||||
final MoreKeysKeyboardParams params = new MoreKeysKeyboardParams();
|
||||
params.setParameters(numKeys, columnNum, WIDTH, HEIGHT, coordXInParnet, KEYBOARD_WIDTH,
|
||||
params.setParameters(numKeys, columnNum, WIDTH, HEIGHT, coordXInParent, KEYBOARD_WIDTH,
|
||||
/* isFixedOrderColumn */true, /* dividerWidth */0);
|
||||
return params;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ public class MoreKeysKeyboardBuilderFixedOrderTests extends AndroidTestCase {
|
|||
MoreKeysKeyboardParams params = null;
|
||||
try {
|
||||
final int fixColumns = KEYBOARD_WIDTH / WIDTH;
|
||||
params = createParams(10, fixColumns + 1, HEIGHT);
|
||||
params = createParams(fixColumns + 1, fixColumns + 1, HEIGHT);
|
||||
fail("Should throw IllegalArgumentException");
|
||||
} catch (IllegalArgumentException e) {
|
||||
// Too small keyboard to hold more keys keyboard.
|
||||
|
|
|
@ -43,10 +43,10 @@ public class MoreKeysKeyboardBuilderTests extends AndroidTestCase {
|
|||
super.setUp();
|
||||
}
|
||||
|
||||
private static MoreKeysKeyboardParams createParams(int numKeys, int maxColumns,
|
||||
int coordXInParnet) {
|
||||
private static MoreKeysKeyboardParams createParams(final int numKeys, final int maxColumns,
|
||||
final int coordXInParent) {
|
||||
final MoreKeysKeyboardParams params = new MoreKeysKeyboardParams();
|
||||
params.setParameters(numKeys, maxColumns, WIDTH, HEIGHT, coordXInParnet, KEYBOARD_WIDTH,
|
||||
params.setParameters(numKeys, maxColumns, WIDTH, HEIGHT, coordXInParent, KEYBOARD_WIDTH,
|
||||
/* isFixedOrderColumn */false, /* dividerWidth */0);
|
||||
return params;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ public class MoreKeysKeyboardBuilderTests extends AndroidTestCase {
|
|||
MoreKeysKeyboardParams params = null;
|
||||
try {
|
||||
final int maxColumns = KEYBOARD_WIDTH / WIDTH;
|
||||
params = createParams(10, maxColumns + 1, HEIGHT);
|
||||
params = createParams(maxColumns + 1, maxColumns + 1, HEIGHT);
|
||||
fail("Should throw IllegalArgumentException");
|
||||
} catch (IllegalArgumentException e) {
|
||||
// Too small keyboard to hold more keys keyboard.
|
||||
|
|
Loading…
Reference in a new issue