diff options
author | 2013-02-12 06:49:39 +0000 | |
---|---|---|
committer | 2013-02-12 06:49:41 +0000 | |
commit | e26f0d4320b9f3ad49a5c6d3f5f2ee78bac74a48 (patch) | |
tree | c88ef87b279656d219f93a442bccfe84084a14a7 /tests/src | |
parent | 4cbe84ad08f38bf9c6f8852b406f5052e862a747 (diff) | |
parent | 1c5b2a41ecf118a2d0103bba7747c35329b2e0ee (diff) | |
download | latinime-e26f0d4320b9f3ad49a5c6d3f5f2ee78bac74a48.tar.gz latinime-e26f0d4320b9f3ad49a5c6d3f5f2ee78bac74a48.tar.xz latinime-e26f0d4320b9f3ad49a5c6d3f5f2ee78bac74a48.zip |
Merge "Cleanups"
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/UserHistoryDictIOUtilsTests.java | 8 | ||||
-rw-r--r-- | tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOTests.java | 24 |
2 files changed, 16 insertions, 16 deletions
diff --git a/tests/src/com/android/inputmethod/latin/UserHistoryDictIOUtilsTests.java b/tests/src/com/android/inputmethod/latin/UserHistoryDictIOUtilsTests.java index dd28fabf6..211d012d2 100644 --- a/tests/src/com/android/inputmethod/latin/UserHistoryDictIOUtilsTests.java +++ b/tests/src/com/android/inputmethod/latin/UserHistoryDictIOUtilsTests.java @@ -140,7 +140,7 @@ public class UserHistoryDictIOUtilsTests extends AndroidTestCase out.flush(); out.close(); } catch (IOException e) { - Log.e(TAG, "IO exception while writing file: " + e); + Log.e(TAG, "IO exception while writing file", e); } } @@ -155,9 +155,9 @@ public class UserHistoryDictIOUtilsTests extends AndroidTestCase UserHistoryDictIOUtils.readDictionaryBinary( new UserHistoryDictIOUtils.ByteArrayWrapper(buffer), listener); } catch (FileNotFoundException e) { - Log.e(TAG, "file not found: " + e); + Log.e(TAG, "file not found", e); } catch (IOException e) { - Log.e(TAG, "IOException: " + e); + Log.e(TAG, "IOException", e); } finally { if (inStream != null) { try { @@ -191,7 +191,7 @@ public class UserHistoryDictIOUtilsTests extends AndroidTestCase try { file = File.createTempFile("testReadAndWrite", ".dict", getContext().getCacheDir()); } catch (IOException e) { - Log.d(TAG, "IOException while creating a temporary file: " + e); + Log.d(TAG, "IOException while creating a temporary file", e); } assertNotNull(file); diff --git a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOTests.java b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOTests.java index f3694eada..ade010981 100644 --- a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOTests.java +++ b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOTests.java @@ -116,13 +116,13 @@ public class BinaryDictIOTests extends AndroidTestCase { return new BinaryDictInputOutput.ByteBufferWrapper(buffer); } } catch (IOException e) { - Log.e(TAG, "IOException while making buffer: " + e); + Log.e(TAG, "IOException while making buffer", e); } finally { if (inStream != null) { try { inStream.close(); } catch (IOException e) { - Log.e(TAG, "IOException while closing stream: " + e); + Log.e(TAG, "IOException while closing stream", e); } } } @@ -195,9 +195,9 @@ public class BinaryDictIOTests extends AndroidTestCase { out.flush(); out.close(); } catch (IOException e) { - Log.e(TAG, "IO exception while writing file: " + e); + Log.e(TAG, "IO exception while writing file", e); } catch (UnsupportedFormatException e) { - Log.e(TAG, "UnsupportedFormatException: " + e); + Log.e(TAG, "UnsupportedFormatException", e); } return diff; @@ -257,9 +257,9 @@ public class BinaryDictIOTests extends AndroidTestCase { dict = BinaryDictInputOutput.readDictionaryBinary(buffer, null); diff = System.currentTimeMillis() - now; } catch (IOException e) { - Log.e(TAG, "IOException while reading dictionary: " + e); + Log.e(TAG, "IOException while reading dictionary", e); } catch (UnsupportedFormatException e) { - Log.e(TAG, "Unsupported format: " + e); + Log.e(TAG, "Unsupported format", e); } checkDictionary(dict, words, bigrams, shortcutMap); @@ -275,7 +275,7 @@ public class BinaryDictIOTests extends AndroidTestCase { try { file = File.createTempFile("runReadAndWrite", ".dict", getContext().getCacheDir()); } catch (IOException e) { - Log.e(TAG, "IOException: " + e); + Log.e(TAG, "IOException", e); } assertNotNull(file); @@ -392,9 +392,9 @@ public class BinaryDictIOTests extends AndroidTestCase { resultBigrams); diff = System.currentTimeMillis() - now; } catch (IOException e) { - Log.e(TAG, "IOException " + e); + Log.e(TAG, "IOException", e); } catch (UnsupportedFormatException e) { - Log.e(TAG, "UnsupportedFormatException: " + e); + Log.e(TAG, "UnsupportedFormatException", e); } finally { if (inStream != null) { try { @@ -416,7 +416,7 @@ public class BinaryDictIOTests extends AndroidTestCase { try { file = File.createTempFile("runReadUnigrams", ".dict", getContext().getCacheDir()); } catch (IOException e) { - Log.e(TAG, "IOException: " + e); + Log.e(TAG, "IOException", e); } assertNotNull(file); @@ -499,9 +499,9 @@ public class BinaryDictIOTests extends AndroidTestCase { position = BinaryDictIOUtils.getTerminalPosition(buffer, word); diff = System.nanoTime() - now; } catch (IOException e) { - Log.e(TAG, "IOException while getTerminalPosition: " + e); + Log.e(TAG, "IOException while getTerminalPosition", e); } catch (UnsupportedFormatException e) { - Log.e(TAG, "UnsupportedFormatException while getTermianlPosition: " + e); + Log.e(TAG, "UnsupportedFormatException while getTerminalPosition", e); } assertEquals(FormatSpec.NOT_VALID_WORD != position, contained); |