Skip to content
Snippets Groups Projects
Commit 3f3b0af5 authored by Keisuke Kuroyanagi's avatar Keisuke Kuroyanagi Committed by Android (Google) Code Review
Browse files

Merge "Fix unit tests by adding @UsedForTesting"

parents b1814c96 fde4c5f1
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
package com.android.inputmethod.latin.makedict; package com.android.inputmethod.latin.makedict;
import com.android.inputmethod.annotations.UsedForTesting;
import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils.CharEncoding; import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils.CharEncoding;
import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions; import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions;
import com.android.inputmethod.latin.makedict.FusionDictionary.PtNode; import com.android.inputmethod.latin.makedict.FusionDictionary.PtNode;
...@@ -33,6 +34,7 @@ import java.util.Iterator; ...@@ -33,6 +34,7 @@ import java.util.Iterator;
/** /**
* An implementation of DictEncoder for version 2 binary dictionary. * An implementation of DictEncoder for version 2 binary dictionary.
*/ */
@UsedForTesting
public class Ver2DictEncoder implements DictEncoder { public class Ver2DictEncoder implements DictEncoder {
private final File mDictFile; private final File mDictFile;
...@@ -40,6 +42,7 @@ public class Ver2DictEncoder implements DictEncoder { ...@@ -40,6 +42,7 @@ public class Ver2DictEncoder implements DictEncoder {
private byte[] mBuffer; private byte[] mBuffer;
private int mPosition; private int mPosition;
@UsedForTesting
public Ver2DictEncoder(final File dictFile) { public Ver2DictEncoder(final File dictFile) {
mDictFile = dictFile; mDictFile = dictFile;
mOutStream = null; mOutStream = null;
...@@ -49,6 +52,7 @@ public class Ver2DictEncoder implements DictEncoder { ...@@ -49,6 +52,7 @@ public class Ver2DictEncoder implements DictEncoder {
// This constructor is used only by BinaryDictOffdeviceUtilsTests. // This constructor is used only by BinaryDictOffdeviceUtilsTests.
// If you want to use this in the production code, you should consider keeping consistency of // If you want to use this in the production code, you should consider keeping consistency of
// the interface of Ver3DictDecoder by using factory. // the interface of Ver3DictDecoder by using factory.
@UsedForTesting
public Ver2DictEncoder(final OutputStream outStream) { public Ver2DictEncoder(final OutputStream outStream) {
mDictFile = null; mDictFile = null;
mOutStream = outStream; mOutStream = outStream;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment