From dba8bad06be90164f698fdb7ae3d1706607fe797 Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Sat, 16 Feb 2013 00:16:09 +0000 Subject: [PATCH] ICU-9602 tell ICU4J to ignore conversion test data for good one-way mappings X-SVN-Rev: 33249 --- icu4c/source/test/intltest/convtest.cpp | 8 +++++--- icu4c/source/test/testdata/conversion.txt | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/icu4c/source/test/intltest/convtest.cpp b/icu4c/source/test/intltest/convtest.cpp index d12809ab65d..c16ab81ceee 100644 --- a/icu4c/source/test/intltest/convtest.cpp +++ b/icu4c/source/test/intltest/convtest.cpp @@ -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); } diff --git a/icu4c/source/test/testdata/conversion.txt b/icu4c/source/test/testdata/conversion.txt index 028457f9e96..4e434c66136 100644 --- a/icu4c/source/test/testdata/conversion.txt +++ b/icu4c/source/test/testdata/conversion.txt @@ -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}