diff options
author | 2013-08-19 10:17:02 +0900 | |
---|---|---|
committer | 2013-08-19 11:10:28 +0900 | |
commit | 8aaae56cf6694ec75043be56f1c7812a343b24d5 (patch) | |
tree | 782904f092e365e09c80a8496768c5701350ed35 /tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java | |
parent | 606a056b530c566f3397b8083f83288fe255bff8 (diff) | |
download | latinime-8aaae56cf6694ec75043be56f1c7812a343b24d5.tar.gz latinime-8aaae56cf6694ec75043be56f1c7812a343b24d5.tar.xz latinime-8aaae56cf6694ec75043be56f1c7812a343b24d5.zip |
Fix unit test.
Change-Id: Ib104d5de71c2ab1a07921b407c74c21b0409d9af
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java | 13 |
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 } |