diff options
author | 2013-07-16 01:57:43 -0700 | |
---|---|---|
committer | 2013-07-16 01:57:43 -0700 | |
commit | 3f201481a7d29d47732ed3ed485cfe8ed3e230f7 (patch) | |
tree | 667ce340838c1242183a969beab423e23ff25575 /tests/src | |
parent | 8ab3c1bf447ba471a4f8310e99cc88104fc069e2 (diff) | |
parent | 06aa3d0286173bd6ffde646e2c813fbf489943f1 (diff) | |
download | latinime-3f201481a7d29d47732ed3ed485cfe8ed3e230f7.tar.gz latinime-3f201481a7d29d47732ed3ed485cfe8ed3e230f7.tar.xz latinime-3f201481a7d29d47732ed3ed485cfe8ed3e230f7.zip |
am 06aa3d02: Merge "Small debug helper"
* commit '06aa3d0286173bd6ffde646e2c813fbf489943f1':
Small debug helper
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOTests.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOTests.java b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOTests.java index 55f163255..5ecacc1a8 100644 --- a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOTests.java +++ b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOTests.java @@ -206,6 +206,14 @@ public class BinaryDictIOTests extends AndroidTestCase { } } +// The following is useful to dump the dictionary into a textual file, but it can't compile +// on-device, so it's commented out. +// private void dumpToCombinedFileForDebug(final FusionDictionary dict, final String filename) +// throws IOException { +// com.android.inputmethod.latin.dicttool.CombinedInputOutput.writeDictionaryCombined( +// new java.io.FileWriter(new File(filename)), dict); +// } + private long timeWritingDictToFile(final File file, final FusionDictionary dict, final FormatSpec.FormatOptions formatOptions) { @@ -215,6 +223,9 @@ public class BinaryDictIOTests extends AndroidTestCase { final FileOutputStream out = new FileOutputStream(file); now = System.currentTimeMillis(); + // If you need to dump the dict to a textual file, uncomment the line below and the + // function above + // dumpToCombinedFileForDebug(file, "/tmp/foo"); BinaryDictInputOutput.writeDictionaryBinary(out, dict, formatOptions); diff = System.currentTimeMillis() - now; |