IcuCompatTest.java revision 0357e3dab075ba93be2af9338f42d9cdb1217016
10dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath/* 20dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath * Copyright (C) 2015 The Android Open Source Project 30dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath * 40dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath * Licensed under the Apache License, Version 2.0 (the "License"); 50dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath * you may not use this file except in compliance with the License. 60dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath * You may obtain a copy of the License at 70dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath * 80dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath * http://www.apache.org/licenses/LICENSE-2.0 90dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath * 100dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath * Unless required by applicable law or agreed to in writing, software 110dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath * distributed under the License is distributed on an "AS IS" BASIS, 120dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 130dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath * See the License for the specific language governing permissions and 140dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath * limitations under the License 150dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath */ 160dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath 170dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamathpackage android.support.v4.text; 180dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath 190357e3dab075ba93be2af9338f42d9cdb1217016Aurimas Liutikasimport android.test.suitebuilder.annotation.SmallTest; 200357e3dab075ba93be2af9338f42d9cdb1217016Aurimas Liutikas 210dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamathimport junit.framework.TestCase; 220dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath 230dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamathimport java.util.Locale; 240dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath 250357e3dab075ba93be2af9338f42d9cdb1217016Aurimas Liutikas@SmallTest 260dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamathpublic class IcuCompatTest extends TestCase { 270dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath public void testMaximizeAndGetScript() { 280dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath assertEquals("Latn", ICUCompat.maximizeAndGetScript(new Locale("en", "US"))); 290dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath assertEquals("Visp", ICUCompat.maximizeAndGetScript(Locale.forLanguageTag("en-Visp-US"))); 300dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath } 310dd57e65bcb8c9f0c7468a69ea3549a54a2482dfNarayan Kamath} 32