]> granicus.if.org Git - icu/commitdiff
ICU-9602 tell ICU4J to ignore conversion test data for good one-way mappings
authorMarkus Scherer <markus.icu@gmail.com>
Sat, 16 Feb 2013 00:16:09 +0000 (00:16 +0000)
committerMarkus Scherer <markus.icu@gmail.com>
Sat, 16 Feb 2013 00:16:09 +0000 (00:16 +0000)
X-SVN-Rev: 33249

icu4c/source/test/intltest/convtest.cpp
icu4c/source/test/testdata/conversion.txt

index d12809ab65d8dbed7410a35066240953495d6d27..c16ab81ceee45faf220fd3aea725eadf43734f00 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 2003-2010, International Business Machines
+*   Copyright (C) 2003-2013, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
@@ -652,11 +652,13 @@ ConversionTest::TestGetUnicodeSet2() {
 
 UConverter *
 ConversionTest::cnv_open(const char *name, UErrorCode &errorCode) {
+    if(name!=NULL && *name=='+') {
+        // Converter names that start with '+' are ignored in ICU4J tests.
+        ++name;
+    }
     if(name!=NULL && *name=='*') {
         /* loadTestData(): set the data directory */
         return ucnv_openPackage(loadTestData(errorCode), name+1, &errorCode);
-    } else if(name!=NULL && *name=='+') {
-        return ucnv_open((name+1), &errorCode);
     } else {
         return ucnv_open(name, &errorCode);
     }
index 028457f9e9628712dcf8163b4a28739e32eaabbe..4e434c6613622779a412b8bfdbf2d973fe8ad50a 100644 (file)
@@ -1007,13 +1007,13 @@ conversion:table(nofallback) {
         // Test ticket 9602: Add "good one-way" mapping type (|4).
         // Such mappings are used regardless of the fallback flag.
         {
-          "*test3", "##\uFE0E#\uFE0F",
+          "+*test3", "##\uFE0E#\uFE0F",
           :bin{ 010204010204010204 }, :intvector{ 0,0,0,1,1,1,3,3,3 },
           :int{1}, :int{0},  // no fallbacks
           "", "?", ""
         }
         {
-          "*test3", "##\uFE0E#\uFE0F",
+          "+*test3", "##\uFE0E#\uFE0F",
           :bin{ 010204010204010204 }, :intvector{ 0,0,0,1,1,1,3,3,3 },
           :int{1}, :int{1},  // with fallbacks
           "", "?", ""
@@ -1850,13 +1850,13 @@ conversion:table(nofallback) {
         // Test ticket 9602: Add "good one-way" mapping type (|4).
         // Excluded from roundtrip set, included in the set with fallbacks.
         {
-          "*test3",
+          "+*test3",
           "[{#\uFE0F}]",
           "[#{#\uFE0E}]",
           :int{0}
         }
         {
-          "*test3",
+          "+*test3",
           "[#{#\uFE0E}{#\uFE0F}]",
           "[]",
           :int{1}