aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/utils/ResourceUtilsTests.java
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2019-07-01 21:00:09 +0000
committerXin Li <delphij@google.com>2019-07-01 21:00:09 +0000
commit7c33185b41d774123ab565fa8b6d7afac44c1b18 (patch)
treec1d7ddd47896f4047d307169973e794f2941b029 /tests/src/com/android/inputmethod/latin/utils/ResourceUtilsTests.java
parente4c638b34727c03a1adfba594d95e3f469c56a34 (diff)
parent751578eb61b47ba3e85054dd57c1df3e4b94f1fb (diff)
downloadlatinime-7c33185b41d774123ab565fa8b6d7afac44c1b18.tar.gz
latinime-7c33185b41d774123ab565fa8b6d7afac44c1b18.tar.xz
latinime-7c33185b41d774123ab565fa8b6d7afac44c1b18.zip
DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5699924) into stage-aosp-master
Bug: 134405016 Change-Id: If86628b9fc81ba5a599ae42e2901066c6bccf173
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/utils/ResourceUtilsTests.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/utils/ResourceUtilsTests.java16
1 files changed, 13 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..4aab96a55 100644
--- a/tests/src/com/android/inputmethod/latin/utils/ResourceUtilsTests.java
+++ b/tests/src/com/android/inputmethod/latin/utils/ResourceUtilsTests.java
@@ -16,13 +16,21 @@
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 androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
import java.util.HashMap;
@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 +77,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 +122,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";