diff options
author | 2014-10-14 11:20:33 +0900 | |
---|---|---|
committer | 2014-10-14 11:20:33 +0900 | |
commit | 29b4f7aa671a8229bf0c03170b8df98e456e3fad (patch) | |
tree | 3921713d71c88d17442b57e256c06ea68cce54d9 /tests | |
parent | 847735fdfacfda3fda0e3a1370a35896832cb8bb (diff) | |
download | latinime-29b4f7aa671a8229bf0c03170b8df98e456e3fad.tar.gz latinime-29b4f7aa671a8229bf0c03170b8df98e456e3fad.tar.xz latinime-29b4f7aa671a8229bf0c03170b8df98e456e3fad.zip |
Remove shouldBlockAutoCorrectionBySafetyNet
Bug: 13756409
[Category diff]
+1 27
-1 0
+2 0
-2 0
+3 0
-3 1
+4 11
-4 0
+5 51
-5 0
+6 0
-6 38
+7 0
-7 50
[Weighted category diff]
+1 28
-1 0
+2 0
-2 0
+3 0
-3 1
+4 11
-4 0
+5 51
-5 0
+6 0
-6 39
+7 0
-7 50
show diff for ./en_user_log_phones_2011_08.csv
+1 4
+4 5
+5 7
-6 9
-7 7
The increase of false positives comes from the spaceless
typing test cases that are synthetic data.
Change-Id: I4ea77aa56ebfaa5518c71107169e1d2332de6327
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/utils/EditDistanceTests.java | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/tests/src/com/android/inputmethod/latin/utils/EditDistanceTests.java b/tests/src/com/android/inputmethod/latin/utils/EditDistanceTests.java deleted file mode 100644 index 58312264b..000000000 --- a/tests/src/com/android/inputmethod/latin/utils/EditDistanceTests.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (C) 2010 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.inputmethod.latin.utils; - -import android.test.AndroidTestCase; -import android.test.suitebuilder.annotation.SmallTest; - -@SmallTest -public class EditDistanceTests extends AndroidTestCase { - /* - * dist(kitten, sitting) == 3 - * - * kitten- - * .|||.| - * sitting - */ - public void testExample1() { - final int dist = BinaryDictionaryUtils.editDistance("kitten", "sitting"); - assertEquals("edit distance between 'kitten' and 'sitting' is 3", - 3, dist); - } - - /* - * dist(Sunday, Saturday) == 3 - * - * Saturday - * | |.||| - * S--unday - */ - public void testExample2() { - final int dist = BinaryDictionaryUtils.editDistance("Saturday", "Sunday"); - assertEquals("edit distance between 'Saturday' and 'Sunday' is 3", - 3, dist); - } - - public void testBothEmpty() { - final int dist = BinaryDictionaryUtils.editDistance("", ""); - assertEquals("when both string are empty, no edits are needed", - 0, dist); - } - - public void testFirstArgIsEmpty() { - final int dist = BinaryDictionaryUtils.editDistance("", "aaaa"); - assertEquals("when only one string of the arguments is empty," - + " the edit distance is the length of the other.", - 4, dist); - } - - public void testSecoondArgIsEmpty() { - final int dist = BinaryDictionaryUtils.editDistance("aaaa", ""); - assertEquals("when only one string of the arguments is empty," - + " the edit distance is the length of the other.", - 4, dist); - } - - public void testSameStrings() { - final String arg1 = "The quick brown fox jumps over the lazy dog."; - final String arg2 = "The quick brown fox jumps over the lazy dog."; - final int dist = BinaryDictionaryUtils.editDistance(arg1, arg2); - assertEquals("when same strings are passed, distance equals 0.", - 0, dist); - } - - public void testSameReference() { - final String arg = "The quick brown fox jumps over the lazy dog."; - final int dist = BinaryDictionaryUtils.editDistance(arg, arg); - assertEquals("when same string references are passed, the distance equals 0.", - 0, dist); - } - - public void testNullArg() { - try { - BinaryDictionaryUtils.editDistance(null, "aaa"); - fail("IllegalArgumentException should be thrown."); - } catch (Exception e) { - assertTrue(e instanceof IllegalArgumentException); - } - try { - BinaryDictionaryUtils.editDistance("aaa", null); - fail("IllegalArgumentException should be thrown."); - } catch (Exception e) { - assertTrue(e instanceof IllegalArgumentException); - } - } -} |