Fix breakage in tests.

Change-Id: I4f0472b9f2ea2daeeba3025c588e6d0042c31be7
main
Tom Ouyang 2015-06-23 13:52:19 -07:00
parent 67eaf613f7
commit f470729df2
1 changed files with 18 additions and 18 deletions

View File

@ -379,74 +379,74 @@ public class RichInputConnectionAndTextRangeTests extends AndroidTestCase {
ims.setInputConnection(new MockConnection("users", 5));
ic.resetCachesUponCursorMoveAndReturnSuccess(ims.cursorPos(), ims.cursorPos(), true);
assertTrue(ic.isCursorTouchingWord(sap));
assertTrue(ic.isCursorTouchingWord(sap, true /* checkTextAfter */));
ims.setInputConnection(new MockConnection("users'", 5));
ic.resetCachesUponCursorMoveAndReturnSuccess(ims.cursorPos(), ims.cursorPos(), true);
assertTrue(ic.isCursorTouchingWord(sap));
assertTrue(ic.isCursorTouchingWord(sap, true));
ims.setInputConnection(new MockConnection("users'", 6));
ic.resetCachesUponCursorMoveAndReturnSuccess(ims.cursorPos(), ims.cursorPos(), true);
assertTrue(ic.isCursorTouchingWord(sap));
assertTrue(ic.isCursorTouchingWord(sap, true));
ims.setInputConnection(new MockConnection("'users'", 6));
ic.resetCachesUponCursorMoveAndReturnSuccess(ims.cursorPos(), ims.cursorPos(), true);
assertTrue(ic.isCursorTouchingWord(sap));
assertTrue(ic.isCursorTouchingWord(sap, true));
ims.setInputConnection(new MockConnection("'users'", 7));
ic.resetCachesUponCursorMoveAndReturnSuccess(ims.cursorPos(), ims.cursorPos(), true);
assertTrue(ic.isCursorTouchingWord(sap));
assertTrue(ic.isCursorTouchingWord(sap, true));
ims.setInputConnection(new MockConnection("users '", 6));
ic.resetCachesUponCursorMoveAndReturnSuccess(ims.cursorPos(), ims.cursorPos(), true);
assertFalse(ic.isCursorTouchingWord(sap));
assertFalse(ic.isCursorTouchingWord(sap, true));
ims.setInputConnection(new MockConnection("users '", 7));
ic.resetCachesUponCursorMoveAndReturnSuccess(ims.cursorPos(), ims.cursorPos(), true);
assertFalse(ic.isCursorTouchingWord(sap));
assertFalse(ic.isCursorTouchingWord(sap, true));
ims.setInputConnection(new MockConnection("re-", 3));
ic.resetCachesUponCursorMoveAndReturnSuccess(ims.cursorPos(), ims.cursorPos(), true);
assertTrue(ic.isCursorTouchingWord(sap));
assertTrue(ic.isCursorTouchingWord(sap, true));
ims.setInputConnection(new MockConnection("re--", 4));
ic.resetCachesUponCursorMoveAndReturnSuccess(ims.cursorPos(), ims.cursorPos(), true);
assertFalse(ic.isCursorTouchingWord(sap));
assertFalse(ic.isCursorTouchingWord(sap, true));
ims.setInputConnection(new MockConnection("-", 1));
ic.resetCachesUponCursorMoveAndReturnSuccess(ims.cursorPos(), ims.cursorPos(), true);
assertFalse(ic.isCursorTouchingWord(sap));
assertFalse(ic.isCursorTouchingWord(sap, true));
ims.setInputConnection(new MockConnection("--", 2));
ic.resetCachesUponCursorMoveAndReturnSuccess(ims.cursorPos(), ims.cursorPos(), true);
assertFalse(ic.isCursorTouchingWord(sap));
assertFalse(ic.isCursorTouchingWord(sap, true));
ims.setInputConnection(new MockConnection(" -", 2));
ic.resetCachesUponCursorMoveAndReturnSuccess(ims.cursorPos(), ims.cursorPos(), true);
assertFalse(ic.isCursorTouchingWord(sap));
assertFalse(ic.isCursorTouchingWord(sap, true));
ims.setInputConnection(new MockConnection(" --", 3));
ic.resetCachesUponCursorMoveAndReturnSuccess(ims.cursorPos(), ims.cursorPos(), true);
assertFalse(ic.isCursorTouchingWord(sap));
assertFalse(ic.isCursorTouchingWord(sap, true));
ims.setInputConnection(new MockConnection(" users '", 1));
ic.resetCachesUponCursorMoveAndReturnSuccess(ims.cursorPos(), ims.cursorPos(), true);
assertTrue(ic.isCursorTouchingWord(sap));
assertTrue(ic.isCursorTouchingWord(sap, true));
ims.setInputConnection(new MockConnection(" users '", 3));
ic.resetCachesUponCursorMoveAndReturnSuccess(ims.cursorPos(), ims.cursorPos(), true);
assertTrue(ic.isCursorTouchingWord(sap));
assertTrue(ic.isCursorTouchingWord(sap, true));
ims.setInputConnection(new MockConnection(" users '", 7));
ic.resetCachesUponCursorMoveAndReturnSuccess(ims.cursorPos(), ims.cursorPos(), true);
assertFalse(ic.isCursorTouchingWord(sap));
assertFalse(ic.isCursorTouchingWord(sap, true));
ims.setInputConnection(new MockConnection(" users are", 7));
ic.resetCachesUponCursorMoveAndReturnSuccess(ims.cursorPos(), ims.cursorPos(), true);
assertTrue(ic.isCursorTouchingWord(sap));
assertTrue(ic.isCursorTouchingWord(sap, true));
ims.setInputConnection(new MockConnection(" users 'are", 7));
ic.resetCachesUponCursorMoveAndReturnSuccess(ims.cursorPos(), ims.cursorPos(), true);
assertFalse(ic.isCursorTouchingWord(sap));
assertFalse(ic.isCursorTouchingWord(sap, true));
}
}