From f470729df26c67f48bd55bbf16a3d6066eac2a2f Mon Sep 17 00:00:00 2001 From: Tom Ouyang Date: Tue, 23 Jun 2015 13:52:19 -0700 Subject: [PATCH] Fix breakage in tests. Change-Id: I4f0472b9f2ea2daeeba3025c588e6d0042c31be7 --- .../RichInputConnectionAndTextRangeTests.java | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java b/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java index 08779b9d3..128f9f7db 100644 --- a/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java +++ b/tests/src/com/android/inputmethod/latin/RichInputConnectionAndTextRangeTests.java @@ -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)); } }