aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOTests.java
diff options
context:
space:
mode:
authorYuichiro Hanada <yhanada@google.com>2012-10-05 15:12:50 +0900
committerYuichiro Hanada <yhanada@google.com>2012-10-05 15:17:13 +0900
commit6def28d1dacb0f02c08d91c8be3ed877624f74ab (patch)
tree58c723ae2de6e7a5fdd896018cd61ea6ce2c1993 /tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOTests.java
parent035b2600589fd3db5a3dd8ae2a1ca55c48bd260d (diff)
downloadlatinime-6def28d1dacb0f02c08d91c8be3ed877624f74ab.tar.gz
latinime-6def28d1dacb0f02c08d91c8be3ed877624f74ab.tar.xz
latinime-6def28d1dacb0f02c08d91c8be3ed877624f74ab.zip
Make unit tests create temporary files in the cache directory.
Change-Id: I90791b364b441bc4e8e221d9e668372d15591719
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOTests.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOTests.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOTests.java b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOTests.java
index 2f954318c..b6f6fea4d 100644
--- a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOTests.java
+++ b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOTests.java
@@ -271,7 +271,7 @@ public class BinaryDictIOTests extends AndroidTestCase {
final String message) {
File file = null;
try {
- file = File.createTempFile("runReadAndWrite", ".dict");
+ file = File.createTempFile("runReadAndWrite", ".dict", getContext().getCacheDir());
} catch (IOException e) {
Log.e(TAG, "IOException: " + e);
}
@@ -412,7 +412,7 @@ public class BinaryDictIOTests extends AndroidTestCase {
final FormatSpec.FormatOptions formatOptions, final String message) {
File file = null;
try {
- file = File.createTempFile("runReadUnigrams", ".dict");
+ file = File.createTempFile("runReadUnigrams", ".dict", getContext().getCacheDir());
} catch (IOException e) {
Log.e(TAG, "IOException: " + e);
}
@@ -510,7 +510,8 @@ public class BinaryDictIOTests extends AndroidTestCase {
public void testGetTerminalPosition() {
File file = null;
try {
- file = File.createTempFile("testGetTerminalPosition", ".dict");
+ file = File.createTempFile("testGetTerminalPosition", ".dict",
+ getContext().getCacheDir());
} catch (IOException e) {
// do nothing
}
@@ -561,7 +562,7 @@ public class BinaryDictIOTests extends AndroidTestCase {
public void testDeleteWord() {
File file = null;
try {
- file = File.createTempFile("testDeleteWord", ".dict");
+ file = File.createTempFile("testDeleteWord", ".dict", getContext().getCacheDir());
} catch (IOException e) {
// do nothing
}