Merge "Add unit tests tags"
This commit is contained in:
commit
df1b8d5eec
27 changed files with 70 additions and 27 deletions
|
@ -17,9 +17,11 @@
|
|||
package com.android.inputmethod.keyboard;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.MoreKeysKeyboard.MoreKeysKeyboardParams;
|
||||
|
||||
@SmallTest
|
||||
public class MoreKeysKeyboardBuilderFixedOrderTests extends AndroidTestCase {
|
||||
private static final int WIDTH = 10;
|
||||
private static final int HEIGHT = 10;
|
||||
|
|
|
@ -17,9 +17,11 @@
|
|||
package com.android.inputmethod.keyboard;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.keyboard.MoreKeysKeyboard.MoreKeysKeyboardParams;
|
||||
|
||||
@SmallTest
|
||||
public class MoreKeysKeyboardBuilderTests extends AndroidTestCase {
|
||||
private static final int WIDTH = 10;
|
||||
private static final int HEIGHT = 10;
|
||||
|
|
|
@ -19,6 +19,7 @@ package com.android.inputmethod.keyboard;
|
|||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.test.AndroidTestCase;
|
||||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
import android.view.inputmethod.InputMethodSubtype;
|
||||
|
||||
import com.android.inputmethod.latin.AdditionalSubtype;
|
||||
|
@ -31,6 +32,7 @@ import com.android.inputmethod.latin.LocaleUtils.RunInLocale;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Locale;
|
||||
|
||||
@SmallTest
|
||||
public class SpacebarTextTests extends AndroidTestCase {
|
||||
// Locale to subtypes list.
|
||||
private final ArrayList<InputMethodSubtype> mSubtypesList = CollectionUtils.newArrayList();
|
||||
|
|
|
@ -18,6 +18,7 @@ package com.android.inputmethod.keyboard.internal;
|
|||
|
||||
import android.app.Instrumentation;
|
||||
import android.test.InstrumentationTestCase;
|
||||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.latin.CollectionUtils;
|
||||
|
||||
|
@ -26,6 +27,7 @@ import java.util.ArrayList;
|
|||
import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
|
||||
@SmallTest
|
||||
public class KeySpecParserCsvTests extends InstrumentationTestCase {
|
||||
private final KeyboardTextsSet mTextsSet = new KeyboardTextsSet();
|
||||
|
||||
|
|
|
@ -21,12 +21,14 @@ import static com.android.inputmethod.latin.Constants.CODE_OUTPUT_TEXT;
|
|||
import static com.android.inputmethod.latin.Constants.CODE_UNSPECIFIED;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.latin.Constants;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
|
||||
@SmallTest
|
||||
public class KeySpecParserTests extends AndroidTestCase {
|
||||
private final KeyboardCodesSet mCodesSet = new KeyboardCodesSet();
|
||||
private final KeyboardTextsSet mTextsSet = new KeyboardTextsSet();
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
|
||||
package com.android.inputmethod.keyboard.internal;
|
||||
|
||||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
@SmallTest
|
||||
public class KeyboardStateMultiTouchTests extends KeyboardStateTestsBase {
|
||||
// Chording input in alphabet.
|
||||
public void testChordingAlphabet() {
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
|
||||
package com.android.inputmethod.keyboard.internal;
|
||||
|
||||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
@SmallTest
|
||||
public class KeyboardStateSingleTouchTests extends KeyboardStateTestsBase {
|
||||
// Shift key in alphabet.
|
||||
public void testShiftAlphabet() {
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
package com.android.inputmethod.keyboard.internal;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
@SmallTest
|
||||
public class PointerTrackerQueueTests extends AndroidTestCase {
|
||||
public static class Element implements PointerTrackerQueue.Element {
|
||||
public static int sPhantomUpCount;
|
||||
|
|
|
@ -16,9 +16,11 @@
|
|||
|
||||
package com.android.inputmethod.latin;
|
||||
|
||||
import android.test.suitebuilder.annotation.LargeTest;
|
||||
import android.text.style.SuggestionSpan;
|
||||
import android.text.style.UnderlineSpan;
|
||||
|
||||
@LargeTest
|
||||
public class BlueUnderlineTests extends InputTestsBase {
|
||||
|
||||
public void testBlueUnderline() {
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
package com.android.inputmethod.latin;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
@SmallTest
|
||||
public class EditDistanceTests extends AndroidTestCase {
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
package com.android.inputmethod.latin;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
@SmallTest
|
||||
public class ForgettingCurveTests extends AndroidTestCase {
|
||||
public void testFcToFreq() {
|
||||
for (int i = 0; i < Byte.MAX_VALUE; ++i) {
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package com.android.inputmethod.latin;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import com.android.inputmethod.latin.makedict.FusionDictionary;
|
||||
import com.android.inputmethod.latin.makedict.FusionDictionary.Node;
|
||||
|
@ -26,6 +27,7 @@ import java.util.HashMap;
|
|||
/**
|
||||
* Unit test for FusionDictionary
|
||||
*/
|
||||
@SmallTest
|
||||
public class FusionDictionaryTests extends AndroidTestCase {
|
||||
public void testFindWordInTree() {
|
||||
FusionDictionary dict = new FusionDictionary(new Node(),
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
|
||||
package com.android.inputmethod.latin;
|
||||
|
||||
import android.test.suitebuilder.annotation.LargeTest;
|
||||
|
||||
@LargeTest
|
||||
public class InputLogicTests extends InputTestsBase {
|
||||
|
||||
public void testTypeWord() {
|
||||
|
|
|
@ -16,8 +16,11 @@
|
|||
|
||||
package com.android.inputmethod.latin;
|
||||
|
||||
import android.test.suitebuilder.annotation.LargeTest;
|
||||
|
||||
import com.android.inputmethod.latin.suggestions.SuggestionStripView;
|
||||
|
||||
@LargeTest
|
||||
public class InputLogicTestsNonEnglish extends InputTestsBase {
|
||||
final String NEXT_WORD_PREDICTION_OPTION = "next_word_prediction";
|
||||
|
||||
|
|
|
@ -17,9 +17,11 @@
|
|||
package com.android.inputmethod.latin;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@SmallTest
|
||||
public class InputPointersTests extends AndroidTestCase {
|
||||
private static final int DEFAULT_CAPACITY = 48;
|
||||
|
||||
|
|
|
@ -31,16 +31,12 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputConnection;
|
||||
import android.view.inputmethod.InputMethodInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.view.inputmethod.InputMethodSubtype;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.android.inputmethod.keyboard.Key;
|
||||
import com.android.inputmethod.keyboard.Keyboard;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
|
||||
public class InputTestsBase extends ServiceTestCase<LatinIME> {
|
||||
|
|
|
@ -16,8 +16,11 @@
|
|||
|
||||
package com.android.inputmethod.latin;
|
||||
|
||||
import android.test.suitebuilder.annotation.LargeTest;
|
||||
|
||||
import com.android.inputmethod.latin.R;
|
||||
|
||||
@LargeTest
|
||||
public class PunctuationTests extends InputTestsBase {
|
||||
|
||||
final String NEXT_WORD_PREDICTION_OPTION = "next_word_prediction";
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
package com.android.inputmethod.latin;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
|
||||
@SmallTest
|
||||
public class ResizableIntArrayTests extends AndroidTestCase {
|
||||
private static final int DEFAULT_CAPACITY = 48;
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ package com.android.inputmethod.latin;
|
|||
|
||||
import android.inputmethodservice.InputMethodService;
|
||||
import android.test.AndroidTestCase;
|
||||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
import android.view.inputmethod.ExtractedText;
|
||||
import android.view.inputmethod.ExtractedTextRequest;
|
||||
import android.view.inputmethod.InputConnection;
|
||||
|
@ -25,6 +26,7 @@ import android.view.inputmethod.InputConnectionWrapper;
|
|||
|
||||
import com.android.inputmethod.latin.RichInputConnection.Range;
|
||||
|
||||
@SmallTest
|
||||
public class RichInputConnectionTests extends AndroidTestCase {
|
||||
|
||||
// The following is meant to be a reasonable default for
|
||||
|
|
|
@ -17,10 +17,12 @@
|
|||
package com.android.inputmethod.latin;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
@SmallTest
|
||||
public class StringUtilsTests extends AndroidTestCase {
|
||||
public void testContainsInArray() {
|
||||
assertFalse("empty array", StringUtils.containsInArray("key", new String[0]));
|
||||
|
|
|
@ -19,6 +19,7 @@ package com.android.inputmethod.latin;
|
|||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.test.AndroidTestCase;
|
||||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
import android.view.inputmethod.InputMethodSubtype;
|
||||
|
||||
import com.android.inputmethod.latin.LocaleUtils.RunInLocale;
|
||||
|
@ -26,6 +27,7 @@ import com.android.inputmethod.latin.LocaleUtils.RunInLocale;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Locale;
|
||||
|
||||
@SmallTest
|
||||
public class SubtypeLocaleTests extends AndroidTestCase {
|
||||
// Locale to subtypes list.
|
||||
private final ArrayList<InputMethodSubtype> mSubtypesList = CollectionUtils.newArrayList();
|
||||
|
|
|
@ -16,17 +16,17 @@
|
|||
|
||||
package com.android.inputmethod.latin;
|
||||
|
||||
import android.content.Context;
|
||||
import android.test.AndroidTestCase;
|
||||
import android.test.suitebuilder.annotation.LargeTest;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.inputmethod.latin.UserHistoryDictIOUtils.BigramDictionaryInterface;
|
||||
import com.android.inputmethod.latin.UserHistoryDictIOUtils.OnAddWordListener;
|
||||
import com.android.inputmethod.latin.makedict.BinaryDictInputOutput;
|
||||
import com.android.inputmethod.latin.makedict.FormatSpec;
|
||||
import com.android.inputmethod.latin.makedict.FusionDictionary;
|
||||
import com.android.inputmethod.latin.makedict.FusionDictionary.CharGroup;
|
||||
|
||||
import android.content.Context;
|
||||
import android.test.AndroidTestCase;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
|
@ -39,6 +39,7 @@ import java.util.HashMap;
|
|||
/**
|
||||
* Unit tests for UserHistoryDictIOUtils
|
||||
*/
|
||||
@LargeTest
|
||||
public class UserHistoryDictIOUtilsTests extends AndroidTestCase
|
||||
implements BigramDictionaryInterface {
|
||||
|
||||
|
|
|
@ -16,15 +16,13 @@
|
|||
|
||||
package com.android.inputmethod.latin;
|
||||
|
||||
import com.android.inputmethod.latin.UserHistoryDictionary;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.test.AndroidTestCase;
|
||||
import android.test.suitebuilder.annotation.LargeTest;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
@ -33,6 +31,7 @@ import java.util.Set;
|
|||
/**
|
||||
* Unit tests for UserHistoryDictionary
|
||||
*/
|
||||
@LargeTest
|
||||
public class UserHistoryDictionaryTests extends AndroidTestCase {
|
||||
private static final String TAG = UserHistoryDictionaryTests.class.getSimpleName();
|
||||
private SharedPreferences mPrefs;
|
||||
|
|
|
@ -16,6 +16,12 @@
|
|||
|
||||
package com.android.inputmethod.latin.makedict;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
import android.test.MoreAsserts;
|
||||
import android.test.suitebuilder.annotation.LargeTest;
|
||||
import android.util.Log;
|
||||
import android.util.SparseArray;
|
||||
|
||||
import com.android.inputmethod.latin.CollectionUtils;
|
||||
import com.android.inputmethod.latin.UserHistoryDictIOUtils;
|
||||
import com.android.inputmethod.latin.makedict.BinaryDictInputOutput.FusionDictionaryBufferInterface;
|
||||
|
@ -24,11 +30,6 @@ import com.android.inputmethod.latin.makedict.FusionDictionary.CharGroup;
|
|||
import com.android.inputmethod.latin.makedict.FusionDictionary.Node;
|
||||
import com.android.inputmethod.latin.makedict.FusionDictionary.WeightedString;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
import android.test.MoreAsserts;
|
||||
import android.util.Log;
|
||||
import android.util.SparseArray;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
|
@ -47,6 +48,7 @@ import java.util.Set;
|
|||
/**
|
||||
* Unit tests for BinaryDictInputOutput
|
||||
*/
|
||||
@LargeTest
|
||||
public class BinaryDictIOTests extends AndroidTestCase {
|
||||
private static final String TAG = BinaryDictIOTests.class.getSimpleName();
|
||||
private static final int MAX_UNIGRAMS = 1000;
|
||||
|
|
|
@ -16,32 +16,30 @@
|
|||
|
||||
package com.android.inputmethod.latin.makedict;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
import android.test.MoreAsserts;
|
||||
import android.test.suitebuilder.annotation.LargeTest;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.inputmethod.latin.CollectionUtils;
|
||||
import com.android.inputmethod.latin.makedict.BinaryDictInputOutput.ByteBufferWrapper;
|
||||
import com.android.inputmethod.latin.makedict.BinaryDictInputOutput.CharEncoding;
|
||||
import com.android.inputmethod.latin.makedict.BinaryDictInputOutput.FusionDictionaryBufferInterface;
|
||||
import com.android.inputmethod.latin.makedict.FormatSpec.FileHeader;
|
||||
import com.android.inputmethod.latin.makedict.FusionDictionary.Node;
|
||||
import com.android.inputmethod.latin.makedict.FusionDictionary.WeightedString;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
import android.test.MoreAsserts;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Random;
|
||||
|
||||
@LargeTest
|
||||
public class BinaryDictIOUtilsTests extends AndroidTestCase {
|
||||
private static final String TAG = BinaryDictIOUtilsTests.class.getSimpleName();
|
||||
private static final FormatSpec.FormatOptions FORMAT_OPTIONS =
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
|
||||
package com.android.inputmethod.latin.spellcheck;
|
||||
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.style.CharacterStyle;
|
||||
import android.test.suitebuilder.annotation.LargeTest;
|
||||
import android.text.style.SuggestionSpan;
|
||||
|
||||
import com.android.inputmethod.latin.InputTestsBase;
|
||||
|
||||
@LargeTest
|
||||
public class AndroidSpellCheckerServiceTest extends InputTestsBase {
|
||||
public void testSpellchecker() {
|
||||
mTextView.onAttachedToWindow();
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package com.android.inputmethod.research;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
import android.util.JsonReader;
|
||||
|
||||
import com.android.inputmethod.research.MotionEventReader.ReplayData;
|
||||
|
@ -24,6 +25,7 @@ import com.android.inputmethod.research.MotionEventReader.ReplayData;
|
|||
import java.io.IOException;
|
||||
import java.io.StringReader;
|
||||
|
||||
@SmallTest
|
||||
public class MotionEventReaderTests extends AndroidTestCase {
|
||||
private MotionEventReader mMotionEventReader = new MotionEventReader();
|
||||
private ReplayData mReplayData;
|
||||
|
|
Loading…
Reference in a new issue