summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2015-02-16 16:17:05 +0000
committerNarayan Kamath <narayan@google.com>2015-02-19 09:46:01 +0000
commit0dd57e65bcb8c9f0c7468a69ea3549a54a2482df (patch)
treea251ce408daa992578c8f26cc5c68a84897d7913 /tests
parent595a197184dca59ad7d7d265121a8208e4abd2dc (diff)
downloadandroid_frameworks_support-0dd57e65bcb8c9f0c7468a69ea3549a54a2482df.tar.gz
android_frameworks_support-0dd57e65bcb8c9f0c7468a69ea3549a54a2482df.tar.bz2
android_frameworks_support-0dd57e65bcb8c9f0c7468a69ea3549a54a2482df.zip
Move support library away from using ICU.addLikelySubtags(string)
... and getScript(String). bug: 15876704 Change-Id: I6b046fc4ee91d668cfb4d91ef782180169f4bb46
Diffstat (limited to 'tests')
-rw-r--r--tests/java/android/support/v4/text/IcuCompatTest.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/java/android/support/v4/text/IcuCompatTest.java b/tests/java/android/support/v4/text/IcuCompatTest.java
new file mode 100644
index 0000000000..6f7f459a20
--- /dev/null
+++ b/tests/java/android/support/v4/text/IcuCompatTest.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package android.support.v4.text;
+
+import junit.framework.TestCase;
+
+import java.util.Locale;
+
+public class IcuCompatTest extends TestCase {
+ public void testMaximizeAndGetScript() {
+ assertEquals("Latn", ICUCompat.maximizeAndGetScript(new Locale("en", "US")));
+ assertEquals("Visp", ICUCompat.maximizeAndGetScript(Locale.forLanguageTag("en-Visp-US")));
+ }
+}