sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1552066 - in /sis/branches/JDK6: ./ core/sis-utility/src/test/java/org/apache/sis/util/LocalesTest.java
Date Wed, 18 Dec 2013 19:17:41 GMT
Author: desruisseaux
Date: Wed Dec 18 19:17:41 2013
New Revision: 1552066

URL: http://svn.apache.org/r1552066
Log:
Merge from the JDK7 branch, ignoring the new test case since the feature is unsupported on
the JDK6 branch.

Modified:
    sis/branches/JDK6/   (props changed)
    sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/LocalesTest.java

Propchange: sis/branches/JDK6/
------------------------------------------------------------------------------
  Merged /sis/branches/JDK7:r1551836-1552063

Modified: sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/LocalesTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/LocalesTest.java?rev=1552066&r1=1552065&r2=1552066&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/LocalesTest.java
[UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/LocalesTest.java
[UTF-8] Wed Dec 18 19:17:41 2013
@@ -73,13 +73,14 @@ public final strictfp class LocalesTest 
     @Test
     @DependsOnMethod("testUnique")
     public void testParse() {
+        assertSame(Locale.ENGLISH,       Locales.parse("en"));
         assertSame(Locale.FRENCH,        Locales.parse("fr"));
         assertSame(Locale.FRENCH,        Locales.parse("fra"));
         assertSame(Locale.CANADA_FRENCH, Locales.parse("fr_CA"));
         assertSame(Locale.CANADA_FRENCH, Locales.parse("fra_CA"));
         assertSame(Locale.CANADA_FRENCH, Locales.parse("fr_CAN"));
         assertSame(Locale.CANADA_FRENCH, Locales.parse("fra_CAN"));
-        assertSame(Locale.ENGLISH,       Locales.parse("en"));
+        assertSame(Locale.JAPAN,         Locales.parse("ja_JP"));
 
         assertEquals(new Locale("de", "DE"),            Locales.parse("de_DE"));
         assertEquals(new Locale("",   "GB"),            Locales.parse("_GB"));
@@ -88,6 +89,17 @@ public final strictfp class LocalesTest 
     }
 
     /**
+     * Tests the {@link Locales#parse(String)} method with a IETF BCP 47 language tag string.
+     * This functionality is supported only on the JDK7 branch.
+     */
+    @Test
+    @org.junit.Ignore("Not supported on the JDK6 branch")
+    public void testParseIETF() {
+        assertEquals(Locale.JAPAN, Locales.parse("ja-JP"));
+        assertEquals(new Locale("en", "US", "POSIX"), Locales.parse("en-US-x-lvariant-POSIX"));
+    }
+
+    /**
      * Tests that {@link Locales#parse(String)} throw an exception if given an invalid argument.
      */
     @Test



Mime
View raw message