aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorKeisuke Kuroyanagi <ksk@google.com>2013-10-01 09:21:59 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-10-01 09:22:00 +0000
commite89a179b1048eb7d9a2edba5c140d6219a85b056 (patch)
tree70ae7b1619af689fcab42418e9c75a215a3b0e96 /tests/src
parentcc81a93b01cbcada13c3791fa5ba73a09ba7e092 (diff)
parent699531099630edd8416e309c914187c285af4c44 (diff)
downloadlatinime-e89a179b1048eb7d9a2edba5c140d6219a85b056.tar.gz
latinime-e89a179b1048eb7d9a2edba5c140d6219a85b056.tar.xz
latinime-e89a179b1048eb7d9a2edba5c140d6219a85b056.zip
Merge "Separate "GC" and "GC with decay"."
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java b/tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java
index cf85d97a0..8a439fc22 100644
--- a/tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java
+++ b/tests/src/com/android/inputmethod/latin/BinaryDictionaryDecayingTests.java
@@ -32,6 +32,11 @@ public class BinaryDictionaryDecayingTests extends AndroidTestCase {
private static final String TEST_DICT_FILE_EXTENSION = ".testDict";
private static final String TEST_LOCALE = "test";
+ // Note that these are corresponding definitions in native code in
+ // latinime::DynamicPatriciaTriePolicy.
+ private static final String SET_NEEDS_TO_DECAY_FOR_TESTING_KEY =
+ "SET_NEEDS_TO_DECAY_FOR_TESTING";
+
private static final int DUMMY_PROBABILITY = 0;
@Override
@@ -45,6 +50,7 @@ public class BinaryDictionaryDecayingTests extends AndroidTestCase {
}
private void forcePassingShortTime(final BinaryDictionary binaryDictionary) {
+ binaryDictionary.getPropertyForTests(SET_NEEDS_TO_DECAY_FOR_TESTING_KEY);
binaryDictionary.flushWithGC();
}
@@ -53,6 +59,7 @@ public class BinaryDictionaryDecayingTests extends AndroidTestCase {
// typed in 32 GCs are removed.
final int count = 32;
for (int i = 0; i < count; i++) {
+ binaryDictionary.getPropertyForTests(SET_NEEDS_TO_DECAY_FOR_TESTING_KEY);
binaryDictionary.flushWithGC();
}
}