am df1b8d5e: Merge "Add unit tests tags"

# Via Android (Google) Code Review (1) and Tadashi G. Takaoka (1)
* commit 'df1b8d5eec1909a7ff000825e20e1e45d6f39297':
  Add unit tests tags
main
Tadashi G. Takaoka 2013-02-04 18:55:04 -08:00 committed by Android Git Automerger
commit 86cc13809f
27 changed files with 70 additions and 27 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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() {

View File

@ -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() {

View File

@ -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;

View File

@ -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() {

View File

@ -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 {

View File

@ -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) {

View File

@ -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(),

View File

@ -16,6 +16,9 @@
package com.android.inputmethod.latin;
import android.test.suitebuilder.annotation.LargeTest;
@LargeTest
public class InputLogicTests extends InputTestsBase {
public void testTypeWord() {

View File

@ -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";

View File

@ -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;

View File

@ -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> {

View File

@ -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";

View File

@ -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;

View File

@ -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

View File

@ -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]));

View File

@ -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();

View File

@ -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 {

View File

@ -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;

View File

@ -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;

View File

@ -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 =

View File

@ -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();

View File

@ -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;