am be1232b3: am b12c2af3: Tighten unit test condition of MoreKeysKeyboardBuilder
* commit 'be1232b36f6fb54dfbccf051d709f34b290a5320': Tighten unit test condition of MoreKeysKeyboardBuildermain
commit
b0d3d86c3f
|
@ -43,10 +43,10 @@ public class MoreKeysKeyboardBuilderFixedOrderTests extends AndroidTestCase {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static MoreKeysKeyboardParams createParams(int numKeys, int columnNum,
|
private static MoreKeysKeyboardParams createParams(final int numKeys, final int columnNum,
|
||||||
int coordXInParnet) {
|
final int coordXInParent) {
|
||||||
final MoreKeysKeyboardParams params = new MoreKeysKeyboardParams();
|
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);
|
/* isFixedOrderColumn */true, /* dividerWidth */0);
|
||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ public class MoreKeysKeyboardBuilderFixedOrderTests extends AndroidTestCase {
|
||||||
MoreKeysKeyboardParams params = null;
|
MoreKeysKeyboardParams params = null;
|
||||||
try {
|
try {
|
||||||
final int fixColumns = KEYBOARD_WIDTH / WIDTH;
|
final int fixColumns = KEYBOARD_WIDTH / WIDTH;
|
||||||
params = createParams(10, fixColumns + 1, HEIGHT);
|
params = createParams(fixColumns + 1, fixColumns + 1, HEIGHT);
|
||||||
fail("Should throw IllegalArgumentException");
|
fail("Should throw IllegalArgumentException");
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
// Too small keyboard to hold more keys keyboard.
|
// Too small keyboard to hold more keys keyboard.
|
||||||
|
|
|
@ -43,10 +43,10 @@ public class MoreKeysKeyboardBuilderTests extends AndroidTestCase {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static MoreKeysKeyboardParams createParams(int numKeys, int maxColumns,
|
private static MoreKeysKeyboardParams createParams(final int numKeys, final int maxColumns,
|
||||||
int coordXInParnet) {
|
final int coordXInParent) {
|
||||||
final MoreKeysKeyboardParams params = new MoreKeysKeyboardParams();
|
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);
|
/* isFixedOrderColumn */false, /* dividerWidth */0);
|
||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ public class MoreKeysKeyboardBuilderTests extends AndroidTestCase {
|
||||||
MoreKeysKeyboardParams params = null;
|
MoreKeysKeyboardParams params = null;
|
||||||
try {
|
try {
|
||||||
final int maxColumns = KEYBOARD_WIDTH / WIDTH;
|
final int maxColumns = KEYBOARD_WIDTH / WIDTH;
|
||||||
params = createParams(10, maxColumns + 1, HEIGHT);
|
params = createParams(maxColumns + 1, maxColumns + 1, HEIGHT);
|
||||||
fail("Should throw IllegalArgumentException");
|
fail("Should throw IllegalArgumentException");
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
// Too small keyboard to hold more keys keyboard.
|
// Too small keyboard to hold more keys keyboard.
|
||||||
|
|
Loading…
Reference in New Issue