Migrate packages/inputmethods/LatinIME to androidx.test

See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: I63edeced1465725cd8d6467cd75ea1acc2608932
This commit is contained in:
Brett Chabot 2018-12-13 19:06:42 -08:00
parent f7b80bb317
commit c05a70a4ca
54 changed files with 238 additions and 218 deletions

View file

@ -30,7 +30,7 @@ android {
applicationId 'com.android.inputmethod.latin' applicationId 'com.android.inputmethod.latin'
testApplicationId 'com.android.inputmethod.latin.tests' testApplicationId 'com.android.inputmethod.latin.tests'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = false vectorDrawables.useSupportLibrary = false
signingConfig signingConfigs.debug signingConfig signingConfigs.debug

View file

@ -26,7 +26,7 @@ android_test {
], ],
static_libs: [ static_libs: [
"android-support-test", "androidx.test.rules",
"mockito-target-minus-junit4", "mockito-target-minus-junit4",
], ],
libs: [ libs: [

View file

@ -28,7 +28,7 @@
<!-- meta-data android:name="com.android.contacts.iconset" android:resource="@xml/iconset" /--> <!-- meta-data android:name="com.android.contacts.iconset" android:resource="@xml/iconset" /-->
</application> </application>
<instrumentation android:name="android.support.test.runner.AndroidJUnitRunner" <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
android:targetPackage="com.android.inputmethod.latin" android:targetPackage="com.android.inputmethod.latin"
android:label="LatinIME tests"> android:label="LatinIME tests">
</instrumentation> </instrumentation>

View file

@ -34,7 +34,7 @@
<option name="test-tag" value="LatinIMETests" /> <option name="test-tag" value="LatinIMETests" />
<test class="com.android.tradefed.testtype.AndroidJUnitTest" > <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
<option name="package" value="com.android.inputmethod.latin.tests" /> <option name="package" value="com.android.inputmethod.latin.tests" />
<option name="runner" value="android.support.test.runner.AndroidJUnitRunner" /> <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
<option name="hidden-api-checks" value="false"/> <option name="hidden-api-checks" value="false"/>
</test> </test>
</configuration> </configuration>

View file

@ -22,19 +22,18 @@ import static org.junit.Assert.assertTrue;
import android.graphics.Typeface; import android.graphics.Typeface;
import android.os.Build; import android.os.Build;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.Spanned; import android.text.Spanned;
import android.text.style.StyleSpan; import android.text.style.StyleSpan;
import java.util.Locale; import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.After;
import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import java.util.Locale;
@SmallTest @SmallTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class LocaleSpanCompatUtilsTests { public class LocaleSpanCompatUtilsTests {

View file

@ -22,25 +22,26 @@ import static org.junit.Assert.assertTrue;
import android.annotation.TargetApi; import android.annotation.TargetApi;
import android.content.Context; import android.content.Context;
import android.os.Build; import android.os.Build;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.text.Spanned; import android.text.Spanned;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.style.SuggestionSpan; import android.text.style.SuggestionSpan;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.SuggestedWords; import com.android.inputmethod.latin.SuggestedWords;
import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Locale; import java.util.Locale;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import org.junit.Test;
import org.junit.runner.RunWith;
@SmallTest @SmallTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class SuggestionSpanUtilsTest { public class SuggestionSpanUtilsTest {

View file

@ -20,8 +20,6 @@ import static org.junit.Assert.assertTrue;
import android.graphics.Typeface; import android.graphics.Typeface;
import android.os.Parcel; import android.os.Parcel;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.Spanned; import android.text.Spanned;
import android.text.TextUtils; import android.text.TextUtils;
@ -29,12 +27,14 @@ import android.text.style.StyleSpan;
import android.text.style.URLSpan; import android.text.style.URLSpan;
import android.view.textservice.TextInfo; import android.view.textservice.TextInfo;
import java.util.Arrays; import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import java.util.Arrays;
@SmallTest @SmallTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class TextInfoCompatUtilsTests { public class TextInfoCompatUtilsTests {

View file

@ -18,14 +18,14 @@ package com.android.inputmethod.keyboard;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import android.support.test.filters.SmallTest; import androidx.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import java.util.ArrayList;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import java.util.ArrayList;
@SmallTest @SmallTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class KeyboardLayoutTest { public class KeyboardLayoutTest {

View file

@ -16,31 +16,32 @@
package com.android.inputmethod.keyboard; package com.android.inputmethod.keyboard;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_ICS; import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_ICS;
import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_KLP; import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_KLP;
import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_LXX_DARK; import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_LXX_DARK;
import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_LXX_LIGHT; import static com.android.inputmethod.keyboard.KeyboardTheme.THEME_ID_LXX_LIGHT;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import android.content.Context; import android.content.Context;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.os.Build; import android.os.Build;
import android.os.Build.VERSION_CODES; import android.os.Build.VERSION_CODES;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import java.util.Arrays; import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import java.util.Arrays;
@SmallTest @SmallTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class KeyboardThemeTests { public class KeyboardThemeTests {

View file

@ -20,8 +20,8 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import android.support.test.filters.MediumTest; import androidx.test.filters.MediumTest;
import android.support.test.runner.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.keyboard.MoreKeysKeyboard.MoreKeysKeyboardParams; import com.android.inputmethod.keyboard.MoreKeysKeyboard.MoreKeysKeyboardParams;

View file

@ -20,8 +20,8 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import android.support.test.filters.MediumTest; import androidx.test.filters.MediumTest;
import android.support.test.runner.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.keyboard.MoreKeysKeyboard.MoreKeysKeyboardParams; import com.android.inputmethod.keyboard.MoreKeysKeyboard.MoreKeysKeyboardParams;

View file

@ -20,8 +20,8 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import android.support.test.filters.MediumTest; import androidx.test.filters.MediumTest;
import android.support.test.runner.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.keyboard.MoreKeysKeyboard.MoreKeysKeyboardParams; import com.android.inputmethod.keyboard.MoreKeysKeyboard.MoreKeysKeyboardParams;

View file

@ -18,8 +18,8 @@ package com.android.inputmethod.keyboard.internal;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import android.support.test.filters.SmallTest; import androidx.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View file

@ -20,24 +20,25 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import android.content.Context; import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodInfo;
import android.view.inputmethod.InputMethodSubtype; import android.view.inputmethod.InputMethodSubtype;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.RichInputMethodManager; import com.android.inputmethod.latin.RichInputMethodManager;
import com.android.inputmethod.latin.utils.SubtypeLocaleUtils; import com.android.inputmethod.latin.utils.SubtypeLocaleUtils;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@SmallTest @SmallTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public final class KeyboardTextsSetTests { public final class KeyboardTextsSetTests {

View file

@ -19,15 +19,14 @@ package com.android.inputmethod.keyboard.internal;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import com.android.inputmethod.keyboard.internal.MatrixUtils.MatrixOperationFailedException; import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import android.support.test.filters.SmallTest; import com.android.inputmethod.keyboard.internal.MatrixUtils.MatrixOperationFailedException;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@SmallTest @SmallTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class MatrixUtilsTests { public class MatrixUtilsTests {

View file

@ -21,19 +21,20 @@ import static org.junit.Assert.fail;
import android.content.Context; import android.content.Context;
import android.content.res.Resources; import android.content.res.Resources;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest; import androidx.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4; import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.R;
import java.util.Arrays;
import java.util.Locale;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import java.util.Arrays;
import java.util.Locale;
@SmallTest @SmallTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class MoreKeySpecSplitTests { public class MoreKeySpecSplitTests {

View file

@ -22,18 +22,19 @@ import static org.junit.Assert.fail;
import android.app.Instrumentation; import android.app.Instrumentation;
import android.content.Context; import android.content.Context;
import android.content.res.Resources; import android.content.res.Resources;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest; import androidx.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4; import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.tests.R; import com.android.inputmethod.latin.tests.R;
import java.util.Locale;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import java.util.Locale;
@SmallTest @SmallTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class MoreKeySpecStringReferenceTests { public class MoreKeySpecStringReferenceTests {

View file

@ -20,8 +20,8 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import android.support.test.filters.SmallTest; import androidx.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View file

@ -19,10 +19,10 @@ package com.android.inputmethod.keyboard.internal;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import com.android.inputmethod.keyboard.internal.MatrixUtils.MatrixOperationFailedException; import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import android.support.test.filters.SmallTest; import com.android.inputmethod.keyboard.internal.MatrixUtils.MatrixOperationFailedException;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View file

@ -21,12 +21,13 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.LargeTest;
import android.support.test.runner.AndroidJUnit4;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Pair; import android.util.Pair;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.LargeTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.NgramContext.WordInfo; import com.android.inputmethod.latin.NgramContext.WordInfo;
import com.android.inputmethod.latin.common.CodePointUtils; import com.android.inputmethod.latin.common.CodePointUtils;
import com.android.inputmethod.latin.common.FileUtils; import com.android.inputmethod.latin.common.FileUtils;
@ -36,6 +37,11 @@ import com.android.inputmethod.latin.makedict.WeightedString;
import com.android.inputmethod.latin.makedict.WordProperty; import com.android.inputmethod.latin.makedict.WordProperty;
import com.android.inputmethod.latin.utils.BinaryDictionaryUtils; import com.android.inputmethod.latin.utils.BinaryDictionaryUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
@ -44,11 +50,6 @@ import java.util.HashSet;
import java.util.Locale; import java.util.Locale;
import java.util.Random; import java.util.Random;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@LargeTest @LargeTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class BinaryDictionaryTests { public class BinaryDictionaryTests {

View file

@ -24,8 +24,9 @@ import static org.mockito.Mockito.when;
import android.content.Context; import android.content.Context;
import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.Contacts;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4; import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;

View file

@ -20,8 +20,8 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import android.support.test.filters.SmallTest; import androidx.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View file

@ -27,24 +27,25 @@ import android.database.MatrixCursor;
import android.net.Uri; import android.net.Uri;
import android.provider.ContactsContract; import android.provider.ContactsContract;
import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.Contacts;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.test.RenamingDelegatingContext; import android.test.RenamingDelegatingContext;
import android.test.mock.MockContentProvider; import android.test.mock.MockContentProvider;
import android.test.mock.MockContentResolver; import android.test.mock.MockContentResolver;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.ContactsDictionaryConstants; import com.android.inputmethod.latin.ContactsDictionaryConstants;
import com.android.inputmethod.latin.ContactsManager; import com.android.inputmethod.latin.ContactsManager;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.concurrent.TimeUnit;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.concurrent.TimeUnit;
/** /**
* Tests for {@link ContactsManager} * Tests for {@link ContactsManager}
*/ */

View file

@ -19,15 +19,15 @@ package com.android.inputmethod.latin;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import java.util.Locale; import androidx.test.InstrumentationRegistry;
import androidx.test.filters.LargeTest;
import android.support.test.InstrumentationRegistry; import androidx.test.runner.AndroidJUnit4;
import android.support.test.filters.LargeTest;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import java.util.Locale;
@LargeTest @LargeTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class DictionaryFacilitatorLruCacheTests { public class DictionaryFacilitatorLruCacheTests {

View file

@ -20,14 +20,14 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.NgramContext.WordInfo; import com.android.inputmethod.latin.NgramContext.WordInfo;
import com.android.inputmethod.latin.settings.SpacingAndPunctuations; import com.android.inputmethod.latin.settings.SpacingAndPunctuations;
import com.android.inputmethod.latin.utils.NgramContextUtils; import com.android.inputmethod.latin.utils.NgramContextUtils;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View file

@ -23,9 +23,6 @@ import static org.junit.Assert.assertTrue;
import android.content.res.Resources; import android.content.res.Resources;
import android.inputmethodservice.InputMethodService; import android.inputmethodservice.InputMethodService;
import android.os.Parcel; import android.os.Parcel;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.style.SuggestionSpan; import android.text.style.SuggestionSpan;
@ -34,6 +31,10 @@ import android.view.inputmethod.ExtractedTextRequest;
import android.view.inputmethod.InputConnection; import android.view.inputmethod.InputConnection;
import android.view.inputmethod.InputConnectionWrapper; import android.view.inputmethod.InputConnectionWrapper;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.common.Constants; import com.android.inputmethod.latin.common.Constants;
import com.android.inputmethod.latin.common.StringUtils; import com.android.inputmethod.latin.common.StringUtils;
import com.android.inputmethod.latin.settings.SpacingAndPunctuations; import com.android.inputmethod.latin.settings.SpacingAndPunctuations;
@ -42,12 +43,12 @@ import com.android.inputmethod.latin.utils.RunInLocale;
import com.android.inputmethod.latin.utils.ScriptUtils; import com.android.inputmethod.latin.utils.ScriptUtils;
import com.android.inputmethod.latin.utils.TextRange; import com.android.inputmethod.latin.utils.TextRange;
import java.util.Locale;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import java.util.Locale;
@SmallTest @SmallTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class RichInputConnectionAndTextRangeTests { public class RichInputConnectionAndTextRangeTests {

View file

@ -25,9 +25,10 @@ import android.content.Context;
import android.content.res.Resources; import android.content.res.Resources;
import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodInfo;
import android.view.inputmethod.InputMethodSubtype; import android.view.inputmethod.InputMethodSubtype;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest; import androidx.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4; import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.RichInputMethodManager; import com.android.inputmethod.latin.RichInputMethodManager;
@ -36,14 +37,14 @@ import com.android.inputmethod.latin.utils.AdditionalSubtypeUtils;
import com.android.inputmethod.latin.utils.RunInLocale; import com.android.inputmethod.latin.utils.RunInLocale;
import com.android.inputmethod.latin.utils.SubtypeLocaleUtils; import com.android.inputmethod.latin.utils.SubtypeLocaleUtils;
import java.util.ArrayList;
import java.util.Locale;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import java.util.ArrayList;
import java.util.Locale;
@SmallTest @SmallTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class RichInputMethodSubtypeTests { public class RichInputMethodSubtypeTests {

View file

@ -20,8 +20,8 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
import android.support.test.filters.SmallTest; import androidx.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;

View file

@ -20,14 +20,13 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import android.support.test.filters.SmallTest; import androidx.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.common.Constants; import com.android.inputmethod.latin.common.Constants;
import com.android.inputmethod.latin.common.CoordinateUtils; import com.android.inputmethod.latin.common.CoordinateUtils;
import com.android.inputmethod.latin.common.StringUtils; import com.android.inputmethod.latin.common.StringUtils;
import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View file

@ -23,9 +23,10 @@ import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest; import androidx.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4; import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.settings.LocalSettingsConstants; import com.android.inputmethod.latin.settings.LocalSettingsConstants;

View file

@ -23,8 +23,8 @@ import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import android.support.test.filters.SmallTest; import androidx.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View file

@ -23,14 +23,14 @@ import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import android.support.test.filters.SmallTest; import androidx.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import java.util.Arrays;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import java.util.Arrays;
@SmallTest @SmallTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class ResizableIntArrayTests { public class ResizableIntArrayTests {

View file

@ -20,14 +20,14 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import android.support.test.filters.SmallTest; import androidx.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import java.util.Locale;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import java.util.Locale;
@SmallTest @SmallTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class StringUtilsTests { public class StringUtilsTests {

View file

@ -19,10 +19,9 @@ package com.android.inputmethod.latin.common;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import android.support.test.filters.SmallTest; import androidx.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View file

@ -24,11 +24,14 @@ import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when; import static org.mockito.Mockito.when;
import android.support.test.filters.SmallTest; import androidx.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.network.BlockingHttpClient.ResponseProcessor; import com.android.inputmethod.latin.network.BlockingHttpClient.ResponseProcessor;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock; import org.mockito.Mock;
import org.mockito.Mockito; import org.mockito.Mockito;
import org.mockito.MockitoAnnotations; import org.mockito.MockitoAnnotations;
@ -43,10 +46,6 @@ import java.net.HttpURLConnection;
import java.util.Arrays; import java.util.Arrays;
import java.util.Random; import java.util.Random;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
/** /**
* Tests for {@link BlockingHttpClient}. * Tests for {@link BlockingHttpClient}.
*/ */

View file

@ -25,16 +25,16 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import android.support.test.filters.SmallTest; import androidx.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.IOException; import java.io.IOException;
import java.net.HttpURLConnection; import java.net.HttpURLConnection;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import org.junit.Test;
import org.junit.runner.RunWith;
/** /**
* Tests for {@link HttpUrlConnectionBuilder}. * Tests for {@link HttpUrlConnectionBuilder}.
*/ */

View file

@ -19,23 +19,24 @@ package com.android.inputmethod.latin.personalization;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import android.content.Context; import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.LargeTest;
import android.support.test.runner.AndroidJUnit4;
import android.util.Log; import android.util.Log;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.LargeTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.ExpandableBinaryDictionary; import com.android.inputmethod.latin.ExpandableBinaryDictionary;
import com.android.inputmethod.latin.utils.BinaryDictionaryUtils; import com.android.inputmethod.latin.utils.BinaryDictionaryUtils;
import java.io.File;
import java.util.Locale;
import java.util.Random;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import java.io.File;
import java.util.Locale;
import java.util.Random;
/** /**
* Unit tests for UserHistoryDictionary * Unit tests for UserHistoryDictionary
*/ */

View file

@ -26,12 +26,13 @@ import android.app.AlertDialog;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.MediumTest;
import android.support.test.runner.AndroidJUnit4;
import android.view.View; import android.view.View;
import android.widget.ListView; import android.widget.ListView;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.MediumTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.utils.ManagedProfileUtils; import com.android.inputmethod.latin.utils.ManagedProfileUtils;
import org.junit.After; import org.junit.After;

View file

@ -23,9 +23,10 @@ import static org.junit.Assert.fail;
import android.content.Context; import android.content.Context;
import android.content.res.Resources; import android.content.res.Resources;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest; import androidx.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4; import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.SuggestedWords; import com.android.inputmethod.latin.SuggestedWords;
import com.android.inputmethod.latin.common.Constants; import com.android.inputmethod.latin.common.Constants;
@ -33,12 +34,12 @@ import com.android.inputmethod.latin.utils.RunInLocale;
import junit.framework.AssertionFailedError; import junit.framework.AssertionFailedError;
import java.util.Locale;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import java.util.Locale;
@SmallTest @SmallTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class SpacingAndPunctuationsTests { public class SpacingAndPunctuationsTests {

View file

@ -21,8 +21,8 @@ import static junit.framework.TestCase.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import android.support.test.filters.SmallTest; import androidx.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.SuggestedWords; import com.android.inputmethod.latin.SuggestedWords;

View file

@ -19,8 +19,8 @@ package com.android.inputmethod.latin.touchinputconsumer;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertSame; import static org.junit.Assert.assertSame;
import android.support.test.filters.SmallTest; import androidx.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View file

@ -16,31 +16,33 @@
package com.android.inputmethod.latin.utils; package com.android.inputmethod.latin.utils;
import static com.android.inputmethod.latin.common.Constants.Subtype.KEYBOARD_MODE;
import static com.android.inputmethod.latin.common.Constants.Subtype.ExtraValue.ASCII_CAPABLE; import static com.android.inputmethod.latin.common.Constants.Subtype.ExtraValue.ASCII_CAPABLE;
import static com.android.inputmethod.latin.common.Constants.Subtype.ExtraValue.EMOJI_CAPABLE; import static com.android.inputmethod.latin.common.Constants.Subtype.ExtraValue.EMOJI_CAPABLE;
import static com.android.inputmethod.latin.common.Constants.Subtype.ExtraValue.IS_ADDITIONAL_SUBTYPE; import static com.android.inputmethod.latin.common.Constants.Subtype.ExtraValue.IS_ADDITIONAL_SUBTYPE;
import static com.android.inputmethod.latin.common.Constants.Subtype.ExtraValue.KEYBOARD_LAYOUT_SET; import static com.android.inputmethod.latin.common.Constants.Subtype.ExtraValue.KEYBOARD_LAYOUT_SET;
import static com.android.inputmethod.latin.common.Constants.Subtype.ExtraValue.UNTRANSLATABLE_STRING_IN_SUBTYPE_NAME; import static com.android.inputmethod.latin.common.Constants.Subtype.ExtraValue.UNTRANSLATABLE_STRING_IN_SUBTYPE_NAME;
import static com.android.inputmethod.latin.common.Constants.Subtype.KEYBOARD_MODE;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import android.content.Context; import android.content.Context;
import android.os.Build; import android.os.Build;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.view.inputmethod.InputMethodSubtype; import android.view.inputmethod.InputMethodSubtype;
import com.android.inputmethod.compat.InputMethodSubtypeCompatUtils; import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import java.util.Locale; import com.android.inputmethod.compat.InputMethodSubtypeCompatUtils;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import java.util.Locale;
@SmallTest @SmallTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class AdditionalSubtypeUtilsTests { public class AdditionalSubtypeUtilsTests {

View file

@ -18,10 +18,11 @@ package com.android.inputmethod.latin.utils;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import android.support.test.filters.MediumTest;
import android.support.test.runner.AndroidJUnit4;
import android.util.Log; import android.util.Log;
import androidx.test.filters.MediumTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View file

@ -20,11 +20,12 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import android.content.res.Resources; import android.content.res.Resources;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.text.TextUtils; import android.text.TextUtils;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.common.LocaleUtils; import com.android.inputmethod.latin.common.LocaleUtils;
import com.android.inputmethod.latin.settings.SpacingAndPunctuations; import com.android.inputmethod.latin.settings.SpacingAndPunctuations;

View file

@ -21,10 +21,13 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.common.CollectionUtils; import com.android.inputmethod.latin.common.CollectionUtils;
import android.support.test.filters.SmallTest; import org.junit.Test;
import android.support.test.runner.AndroidJUnit4; import org.junit.runner.RunWith;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -33,9 +36,6 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.junit.Test;
import org.junit.runner.RunWith;
/** /**
* Tests for {@link CollectionUtils}. * Tests for {@link CollectionUtils}.
*/ */

View file

@ -21,18 +21,19 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import android.content.res.Resources; import android.content.res.Resources;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest; import androidx.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4; import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.common.LocaleUtils; import com.android.inputmethod.latin.common.LocaleUtils;
import com.android.inputmethod.latin.settings.SpacingAndPunctuations; import com.android.inputmethod.latin.settings.SpacingAndPunctuations;
import java.util.Locale;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import java.util.Locale;
@SmallTest @SmallTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class DictionaryInfoUtilsTests { public class DictionaryInfoUtilsTests {

View file

@ -18,17 +18,18 @@ package com.android.inputmethod.latin.utils;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import android.support.test.filters.MediumTest;
import android.support.test.runner.AndroidJUnit4;
import android.util.Log; import android.util.Log;
import androidx.test.filters.MediumTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import org.junit.Test;
import org.junit.runner.RunWith;
/** /**
* Unit tests for {@link ExecutorUtils}. * Unit tests for {@link ExecutorUtils}.
*/ */

View file

@ -17,14 +17,16 @@
package com.android.inputmethod.latin.utils; package com.android.inputmethod.latin.utils;
import static com.android.inputmethod.latin.utils.ImportantNoticeUtils.KEY_TIMESTAMP_OF_CONTACTS_NOTICE; import static com.android.inputmethod.latin.utils.ImportantNoticeUtils.KEY_TIMESTAMP_OF_CONTACTS_NOTICE;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.when; import static org.mockito.Mockito.when;
import android.content.Context; import android.content.Context;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.MediumTest; import androidx.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4; import androidx.test.filters.MediumTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.settings.SettingsValues; import com.android.inputmethod.latin.settings.SettingsValues;

View file

@ -18,15 +18,15 @@ package com.android.inputmethod.latin.utils;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import android.support.test.filters.SmallTest; import androidx.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import java.util.Arrays;
import java.util.List;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import java.util.Arrays;
import java.util.List;
@SmallTest @SmallTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class JsonUtilsTests { public class JsonUtilsTests {

View file

@ -19,29 +19,31 @@ package com.android.inputmethod.latin.utils;
import static com.android.inputmethod.latin.utils.LanguageOnSpacebarUtils.FORMAT_TYPE_FULL_LOCALE; import static com.android.inputmethod.latin.utils.LanguageOnSpacebarUtils.FORMAT_TYPE_FULL_LOCALE;
import static com.android.inputmethod.latin.utils.LanguageOnSpacebarUtils.FORMAT_TYPE_LANGUAGE_ONLY; import static com.android.inputmethod.latin.utils.LanguageOnSpacebarUtils.FORMAT_TYPE_LANGUAGE_ONLY;
import static com.android.inputmethod.latin.utils.LanguageOnSpacebarUtils.FORMAT_TYPE_NONE; import static com.android.inputmethod.latin.utils.LanguageOnSpacebarUtils.FORMAT_TYPE_NONE;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import android.content.Context; import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.view.inputmethod.InputMethodSubtype; import android.view.inputmethod.InputMethodSubtype;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.RichInputMethodManager; import com.android.inputmethod.latin.RichInputMethodManager;
import com.android.inputmethod.latin.RichInputMethodSubtype; import com.android.inputmethod.latin.RichInputMethodSubtype;
import com.android.inputmethod.latin.utils.AdditionalSubtypeUtils; import com.android.inputmethod.latin.utils.AdditionalSubtypeUtils;
import com.android.inputmethod.latin.utils.LanguageOnSpacebarUtils; import com.android.inputmethod.latin.utils.LanguageOnSpacebarUtils;
import com.android.inputmethod.latin.utils.SubtypeLocaleUtils; import com.android.inputmethod.latin.utils.SubtypeLocaleUtils;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Locale; import java.util.Locale;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@SmallTest @SmallTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class LanguageOnSpacebarUtilsTests { public class LanguageOnSpacebarUtilsTests {

View file

@ -18,16 +18,16 @@ package com.android.inputmethod.latin.utils;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import android.support.test.filters.SmallTest; import androidx.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.common.Constants; import com.android.inputmethod.latin.common.Constants;
import java.util.Locale;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import java.util.Locale;
@SmallTest @SmallTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class RecapitalizeStatusTests { public class RecapitalizeStatusTests {

View file

@ -19,15 +19,14 @@ package com.android.inputmethod.latin.utils;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
import android.support.test.filters.SmallTest; import androidx.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4; import androidx.test.runner.AndroidJUnit4;
import java.util.HashMap;
import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import java.util.HashMap;
@SmallTest @SmallTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class ResourceUtilsTests { public class ResourceUtilsTests {

View file

@ -20,15 +20,16 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import android.content.Context; import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.text.style.SuggestionSpan;
import android.text.style.URLSpan;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.SpannableStringBuilder; import android.text.SpannableStringBuilder;
import android.text.Spanned; import android.text.Spanned;
import android.text.SpannedString; import android.text.SpannedString;
import android.text.style.SuggestionSpan;
import android.text.style.URLSpan;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View file

@ -23,24 +23,25 @@ import static org.junit.Assert.assertTrue;
import android.content.Context; import android.content.Context;
import android.content.res.Resources; import android.content.res.Resources;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodInfo;
import android.view.inputmethod.InputMethodSubtype; import android.view.inputmethod.InputMethodSubtype;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.RichInputMethodManager; import com.android.inputmethod.latin.RichInputMethodManager;
import com.android.inputmethod.latin.RichInputMethodSubtype; import com.android.inputmethod.latin.RichInputMethodSubtype;
import java.util.ArrayList;
import java.util.Locale;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import java.util.ArrayList;
import java.util.Locale;
@SmallTest @SmallTest
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class SubtypeLocaleUtilsTests { public class SubtypeLocaleUtilsTests {