aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java
diff options
context:
space:
mode:
authorYuichiro Hanada <yhanada@google.com>2013-08-18 19:26:46 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-08-18 19:26:46 -0700
commit376457477f4118e2e8e4c5bb2df9679f6ab0b899 (patch)
treea9131a8cb149e7e7ac6b6f1b3adf0521961857f5 /tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java
parentef7064b5aa2defa5961b7525e4c10635b036cf01 (diff)
parent8aaae56cf6694ec75043be56f1c7812a343b24d5 (diff)
downloadlatinime-376457477f4118e2e8e4c5bb2df9679f6ab0b899.tar.gz
latinime-376457477f4118e2e8e4c5bb2df9679f6ab0b899.tar.xz
latinime-376457477f4118e2e8e4c5bb2df9679f6ab0b899.zip
am 8aaae56c: Fix unit test.
* commit '8aaae56cf6694ec75043be56f1c7812a343b24d5': Fix unit test.
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java
index e98790b65..70c77e4fa 100644
--- a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java
+++ b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java
@@ -71,6 +71,8 @@ public class BinaryDictDecoderEncoderTests extends AndroidTestCase {
private static final FormatSpec.FormatOptions VERSION3_WITH_DYNAMIC_UPDATE =
new FormatSpec.FormatOptions(3, true /* supportsDynamicUpdate */);
+ private static final String TEST_DICT_FILE_EXTENSION = ".testDict";
+
public BinaryDictDecoderEncoderTests() {
this(System.currentTimeMillis(), DEFAULT_MAX_UNIGRAMS);
}
@@ -293,7 +295,8 @@ public class BinaryDictDecoderEncoderTests extends AndroidTestCase {
final String message) {
File file = null;
try {
- file = File.createTempFile("runReadAndWrite", ".dict", getContext().getCacheDir());
+ file = File.createTempFile("runReadAndWrite", TEST_DICT_FILE_EXTENSION,
+ getContext().getCacheDir());
} catch (IOException e) {
Log.e(TAG, "IOException", e);
}
@@ -435,7 +438,8 @@ public class BinaryDictDecoderEncoderTests extends AndroidTestCase {
final FormatSpec.FormatOptions formatOptions, final String message) {
File file = null;
try {
- file = File.createTempFile("runReadUnigrams", ".dict", getContext().getCacheDir());
+ file = File.createTempFile("runReadUnigrams", TEST_DICT_FILE_EXTENSION,
+ getContext().getCacheDir());
} catch (IOException e) {
Log.e(TAG, "IOException", e);
}
@@ -533,7 +537,7 @@ public class BinaryDictDecoderEncoderTests extends AndroidTestCase {
public void testGetTerminalPosition() {
File file = null;
try {
- file = File.createTempFile("testGetTerminalPosition", ".dict",
+ file = File.createTempFile("testGetTerminalPosition", TEST_DICT_FILE_EXTENSION,
getContext().getCacheDir());
} catch (IOException e) {
// do nothing
@@ -593,7 +597,8 @@ public class BinaryDictDecoderEncoderTests extends AndroidTestCase {
public void testDeleteWord() {
File file = null;
try {
- file = File.createTempFile("testDeleteWord", ".dict", getContext().getCacheDir());
+ file = File.createTempFile("testDeleteWord", TEST_DICT_FILE_EXTENSION,
+ getContext().getCacheDir());
} catch (IOException e) {
// do nothing
}