Fix unit test failure

Change-Id: I6814986f04a0cdf91837cfa60c7eca81a687236b
main
Tadashi G. Takaoka 2011-02-20 14:35:45 +09:00
parent ea6c2e3350
commit 351e3c8ae0
1 changed files with 3 additions and 3 deletions

View File

@ -118,8 +118,8 @@ public class SuggestTests extends SuggestTestsBase {
* Tests to make sure that zero frequency words are not suggested as completions. * Tests to make sure that zero frequency words are not suggested as completions.
*/ */
public void testZeroFrequencySuggestionsNegative() { public void testZeroFrequencySuggestionsNegative() {
assertNull(mHelper.getSuggestIndex("yike", "yikes")); assertTrue(mHelper.getSuggestIndex("yike", "yikes") < 0);
assertNull(mHelper.getSuggestIndex("what", "whatcha")); assertTrue(mHelper.getSuggestIndex("what", "whatcha") < 0);
} }
/** /**
@ -127,7 +127,7 @@ public class SuggestTests extends SuggestTestsBase {
* Also such word is not considered auto correction, in some cases. * Also such word is not considered auto correction, in some cases.
*/ */
public void testTooLargeEditDistance() { public void testTooLargeEditDistance() {
assertNull(mHelper.getSuggestIndex("sniyr", "about")); assertTrue(mHelper.getSuggestIndex("sniyr", "about") < 0);
// TODO: The following test fails. // TODO: The following test fails.
// notSuggested("the", mHelper.getAutoCorrection("rjw")); // notSuggested("the", mHelper.getAutoCorrection("rjw"));
} }