diff options
author | 2018-07-05 13:45:04 -0700 | |
---|---|---|
committer | 2018-07-05 13:45:04 -0700 | |
commit | 9c49581eeb96ebf6ca4dc2110ea986d784c48912 (patch) | |
tree | 403e5d84a56be67fa3a8bb17864322e8a2d393b5 /tests/src/com/android/inputmethod/latin/utils/ResourceUtilsTests.java | |
parent | 2802250415af3bfe57bab6826966a35f75a4ec86 (diff) | |
download | latinime-9c49581eeb96ebf6ca4dc2110ea986d784c48912.tar.gz latinime-9c49581eeb96ebf6ca4dc2110ea986d784c48912.tar.xz latinime-9c49581eeb96ebf6ca4dc2110ea986d784c48912.zip |
Migrate to Android Testing Support Lib (part 1/N)
This CL converts tests under com.android.inputmethod.latin.utils to
Android Testing Support Library.
Bug: 110805255
Test: verified as follows. No new test failures.
tapas adb LatinIME LatinIMETests arm64 userdebug && \
DISABLE_PROGUARD=true make -j LatinIME && \
adb install -r $OUT/system/app/LatinIME/LatinIME.apk && \
atest LatinIMETests:com.android.inputmethod.latin.utils
Change-Id: I5cc2ddbc4116003ab6407432ab521b6b560052ae
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/utils/ResourceUtilsTests.java')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/utils/ResourceUtilsTests.java | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/src/com/android/inputmethod/latin/utils/ResourceUtilsTests.java b/tests/src/com/android/inputmethod/latin/utils/ResourceUtilsTests.java index 8e764e40f..ac05d3c31 100644 --- a/tests/src/com/android/inputmethod/latin/utils/ResourceUtilsTests.java +++ b/tests/src/com/android/inputmethod/latin/utils/ResourceUtilsTests.java @@ -16,13 +16,22 @@ package com.android.inputmethod.latin.utils; -import android.test.AndroidTestCase; -import android.test.suitebuilder.annotation.SmallTest; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; + +import android.support.test.filters.SmallTest; +import android.support.test.runner.AndroidJUnit4; import java.util.HashMap; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; + @SmallTest -public class ResourceUtilsTests extends AndroidTestCase { +@RunWith(AndroidJUnit4.class) +public class ResourceUtilsTests { + @Test public void testFindConstantForKeyValuePairsSimple() { final HashMap<String,String> anyKeyValue = new HashMap<>(); anyKeyValue.put("anyKey", "anyValue"); @@ -69,6 +78,7 @@ public class ResourceUtilsTests extends AndroidTestCase { assertNull(ResourceUtils.findConstantForKeyValuePairs(emptyKeyValue, array)); } + @Test public void testFindConstantForKeyValuePairsCombined() { final String HARDWARE_KEY = "HARDWARE"; final String MODEL_KEY = "MODEL"; @@ -113,6 +123,7 @@ public class ResourceUtilsTests extends AndroidTestCase { assertEquals("0.2", ResourceUtils.findConstantForKeyValuePairs(keyValues, failArray)); } + @Test public void testFindConstantForKeyValuePairsRegexp() { final String HARDWARE_KEY = "HARDWARE"; final String MODEL_KEY = "MODEL"; |