am b12c2af3: Tighten unit test condition of MoreKeysKeyboardBuilder

* commit 'b12c2af32e09624e1298e0109441b0f4d74b74dd':
  Tighten unit test condition of MoreKeysKeyboardBuilder
main
Tadashi G. Takaoka 2013-04-14 18:17:25 -07:00 committed by Android Git Automerger
commit be1232b36f
2 changed files with 8 additions and 8 deletions

View File

@ -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.

View File

@ -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.