aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/RichInputConnectionTests.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-04-12 09:09:25 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-04-12 09:09:25 -0700
commit8895e5fbea6f796b325f32c6a0bc92bd3c9ad8a4 (patch)
tree9c8bb2cb3feaa4138fbfba2b1425deaea6c1dd21 /tests/src/com/android/inputmethod/latin/RichInputConnectionTests.java
parent41e59b6202555ab3f778e1a251147ce943b7e864 (diff)
parent128961ade05725564bdc229098c97c6ed66a2e9e (diff)
downloadlatinime-8895e5fbea6f796b325f32c6a0bc92bd3c9ad8a4.tar.gz
latinime-8895e5fbea6f796b325f32c6a0bc92bd3c9ad8a4.tar.xz
latinime-8895e5fbea6f796b325f32c6a0bc92bd3c9ad8a4.zip
am 128961ad: Fix failing tests
* commit '128961ade05725564bdc229098c97c6ed66a2e9e': Fix failing tests
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/RichInputConnectionTests.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/RichInputConnectionTests.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/src/com/android/inputmethod/latin/RichInputConnectionTests.java b/tests/src/com/android/inputmethod/latin/RichInputConnectionTests.java
index 9e545a5b2..dc8837dab 100644
--- a/tests/src/com/android/inputmethod/latin/RichInputConnectionTests.java
+++ b/tests/src/com/android/inputmethod/latin/RichInputConnectionTests.java
@@ -19,6 +19,7 @@ package com.android.inputmethod.latin;
import android.inputmethodservice.InputMethodService;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
+import android.text.TextUtils;
import android.view.inputmethod.ExtractedText;
import android.view.inputmethod.ExtractedTextRequest;
import android.view.inputmethod.InputConnection;
@@ -141,11 +142,11 @@ public class RichInputConnectionTests extends AndroidTestCase {
ic.beginBatchEdit();
// basic case
r = ic.getWordRangeAtCursor(" ", 0);
- assertEquals("word", r.mWord);
+ assertTrue(TextUtils.equals("word", r.mWord));
// more than one word
r = ic.getWordRangeAtCursor(" ", 1);
- assertEquals("word word", r.mWord);
+ assertTrue(TextUtils.equals("word word", r.mWord));
ic.endBatchEdit();
// tab character instead of space
@@ -153,28 +154,28 @@ public class RichInputConnectionTests extends AndroidTestCase {
ic.beginBatchEdit();
r = ic.getWordRangeAtCursor("\t", 1);
ic.endBatchEdit();
- assertEquals("word\tword", r.mWord);
+ assertTrue(TextUtils.equals("word\tword", r.mWord));
// only one word doesn't go too far
mockInputMethodService.setInputConnection(new MockConnection("one\tword\two", "rd", et));
ic.beginBatchEdit();
r = ic.getWordRangeAtCursor("\t", 1);
ic.endBatchEdit();
- assertEquals("word\tword", r.mWord);
+ assertTrue(TextUtils.equals("word\tword", r.mWord));
// tab or space
mockInputMethodService.setInputConnection(new MockConnection("one word\two", "rd", et));
ic.beginBatchEdit();
r = ic.getWordRangeAtCursor(" \t", 1);
ic.endBatchEdit();
- assertEquals("word\tword", r.mWord);
+ assertTrue(TextUtils.equals("word\tword", r.mWord));
// tab or space multiword
mockInputMethodService.setInputConnection(new MockConnection("one word\two", "rd", et));
ic.beginBatchEdit();
r = ic.getWordRangeAtCursor(" \t", 2);
ic.endBatchEdit();
- assertEquals("one word\tword", r.mWord);
+ assertTrue(TextUtils.equals("one word\tword", r.mWord));
// splitting on supplementary character
final String supplementaryChar = "\uD840\uDC8A";
@@ -183,6 +184,6 @@ public class RichInputConnectionTests extends AndroidTestCase {
ic.beginBatchEdit();
r = ic.getWordRangeAtCursor(supplementaryChar, 0);
ic.endBatchEdit();
- assertEquals("word", r.mWord);
+ assertTrue(TextUtils.equals("word", r.mWord));
}
}