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 16:48:34 +0900
committerKeisuke Kuroyanagi <ksk@google.com>2013-12-12 16:48:34 +0900
commit9ff51527a398a6db15d67e9a592785fd3bce542b (patch)
treeee2380262528301507a08586f5950875d8b6f071 /tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java
parent4e9d115401ce4deec7308849d63e0e64a3ed24cd (diff)
downloadlatinime-9ff51527a398a6db15d67e9a592785fd3bce542b.tar.gz
latinime-9ff51527a398a6db15d67e9a592785fd3bce542b.tar.xz
latinime-9ff51527a398a6db15d67e9a592785fd3bce542b.zip
Quit passing header file path to native.
Bug: 12089197 Change-Id: Ia898f8d2836c0c131a1834dc0a396d9121ecb972
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();
}
}