aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java
diff options
context:
space:
mode:
authorKeisuke Kuroyanagi <ksk@google.com>2013-12-12 00:01:57 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2013-12-12 00:01:57 -0800
commitc01ade214d5640270b90df43fd17efc569445b6c (patch)
treeee2380262528301507a08586f5950875d8b6f071 /tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java
parent69b849f05edd559bd0ae229bba8e41fcfcb865ce (diff)
parent9ff51527a398a6db15d67e9a592785fd3bce542b (diff)
downloadlatinime-c01ade214d5640270b90df43fd17efc569445b6c.tar.gz
latinime-c01ade214d5640270b90df43fd17efc569445b6c.tar.xz
latinime-c01ade214d5640270b90df43fd17efc569445b6c.zip
am 9ff51527: Quit passing header file path to native.
* commit '9ff51527a398a6db15d67e9a592785fd3bce542b': Quit passing header file path to native.
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java b/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java
index f0fe3f2e1..68e94c816 100644
--- a/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java
+++ b/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java
@@ -20,6 +20,7 @@ import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.LargeTest;
import android.util.Log;
+import com.android.inputmethod.latin.ExpandableBinaryDictionary;
import com.android.inputmethod.latin.utils.CollectionUtils;
import java.io.File;
@@ -136,7 +137,8 @@ public class UserHistoryDictionaryTests extends AndroidTestCase {
Log.d(TAG, "This test can be used for profiling.");
Log.d(TAG, "Usage: please set UserHistoryDictionary.PROFILE_SAVE_RESTORE to true.");
final String testFilenameSuffix = "test_random_words" + System.currentTimeMillis();
- final String fileName = UserHistoryDictionary.NAME + "." + testFilenameSuffix;
+ final String fileName = UserHistoryDictionary.NAME + "." + testFilenameSuffix
+ + ExpandableBinaryDictionary.DICT_FILE_EXTENSION;
final int numberOfWords = 1000;
final Random random = new Random(123456);
@@ -151,7 +153,6 @@ public class UserHistoryDictionaryTests extends AndroidTestCase {
final File dictFile = new File(getContext().getFilesDir(), fileName);
if (dictFile != null) {
assertTrue(dictFile.exists());
- assertTrue(dictFile.length() >= MIN_USER_HISTORY_DICTIONARY_FILE_SIZE);
dictFile.delete();
}
}
@@ -170,7 +171,8 @@ public class UserHistoryDictionaryTests extends AndroidTestCase {
// Create filename suffixes for this test.
for (int i = 0; i < numberOfLanguages; i++) {
testFilenameSuffixes[i] = "test_switching_languages" + i;
- final String fileName = UserHistoryDictionary.NAME + "." + testFilenameSuffixes[i];
+ final String fileName = UserHistoryDictionary.NAME + "." + testFilenameSuffixes[i]
+ + ExpandableBinaryDictionary.DICT_FILE_EXTENSION;
dictFiles[i] = new File(getContext().getFilesDir(), fileName);
clearHistory(testFilenameSuffixes[i]);
}
@@ -196,7 +198,6 @@ public class UserHistoryDictionaryTests extends AndroidTestCase {
for (final File file : dictFiles) {
if (file != null) {
assertTrue(file.exists());
- assertTrue(file.length() >= MIN_USER_HISTORY_DICTIONARY_FILE_SIZE);
file.delete();
}
}
@@ -214,11 +215,11 @@ public class UserHistoryDictionaryTests extends AndroidTestCase {
} finally {
Log.d(TAG, "waiting for writing ...");
waitForWriting(testFilenameSuffix);
- final String fileName = UserHistoryDictionary.NAME + "." + testFilenameSuffix;
+ final String fileName = UserHistoryDictionary.NAME + "." + testFilenameSuffix
+ + ExpandableBinaryDictionary.DICT_FILE_EXTENSION;
final File dictFile = new File(getContext().getFilesDir(), fileName);
if (dictFile != null) {
assertTrue(dictFile.exists());
- assertTrue(dictFile.length() >= MIN_USER_HISTORY_DICTIONARY_FILE_SIZE);
dictFile.delete();
}
}