diff --git a/icu4c/source/test/intltest/apicoll.cpp b/icu4c/source/test/intltest/apicoll.cpp index 9c6756c6144..89c463e1223 100644 --- a/icu4c/source/test/intltest/apicoll.cpp +++ b/icu4c/source/test/intltest/apicoll.cpp @@ -106,7 +106,7 @@ CollationAPITest::TestProperty(/* char* par */) logln("The property tests begin : "); logln("Test ctors : "); - col = Collator::createInstance(success); + col = Collator::createInstance(Locale::ENGLISH, success); if (U_FAILURE(success)) { @@ -207,7 +207,7 @@ CollationAPITest::TestProperty(/* char* par */) } delete col; - col = Collator::createInstance(success); + col = Collator::createInstance(Locale::ENGLISH, success); if (U_FAILURE(success)) { errln("Creating default collator failed."); @@ -259,7 +259,7 @@ CollationAPITest::TestHashCode(/* char* par */) logln("hashCode tests begin."); UErrorCode success = U_ZERO_ERROR; Collator *col1 = 0; - col1 = Collator::createInstance(success); + col1 = Collator::createInstance(Locale::ENGLISH, success); if (U_FAILURE(success)) { errln("Default collation creation failed."); @@ -276,7 +276,7 @@ CollationAPITest::TestHashCode(/* char* par */) } Collator *col3 = 0; - col3 = Collator::createInstance(success); + col3 = Collator::createInstance(Locale::ENGLISH, success); if (U_FAILURE(success)) { errln("2nd default collation creation failed."); @@ -304,7 +304,7 @@ CollationAPITest::TestCollationKey(/* char* par */) logln("testing CollationKey begins..."); Collator *col = 0; UErrorCode success=U_ZERO_ERROR; - col = Collator::createInstance(success); + col = Collator::createInstance(Locale::ENGLISH, success); if (U_FAILURE(success)) { errln("Default collation creation failed."); @@ -388,7 +388,7 @@ CollationAPITest::TestElemIter(/* char* par */) logln("testing sortkey begins..."); Collator *col = 0; UErrorCode success = U_ZERO_ERROR; - col = Collator::createInstance(success); + col = Collator::createInstance(Locale::ENGLISH, success); if (U_FAILURE(success)) { errln("Default collation creation failed."); @@ -396,7 +396,7 @@ CollationAPITest::TestElemIter(/* char* par */) } UnicodeString testString1("XFILE What subset of all possible test cases has the highest probability of detecting the most errors?"); - UnicodeString testString2("Xf ile What subset of all possible test cases has the lowest probability of detecting the least errors?"); + UnicodeString testString2("Xf_ile What subset of all possible test cases has the lowest probability of detecting the least errors?"); logln("Constructors and comparison testing...."); CollationElementIterator *iterator1 = ((RuleBasedCollator*)col)->createCollationElementIterator(testString1); @@ -459,8 +459,8 @@ CollationAPITest::TestElemIter(/* char* par */) order1 = iterator1->next(success); order3 = iterator3->next(success); - doAssert((CollationElementIterator::secondaryOrder(order1) == - CollationElementIterator::secondaryOrder(order3)), "The secondary orders should be the same"); + doAssert((CollationElementIterator::secondaryOrder(order1) != + CollationElementIterator::secondaryOrder(order3)), "The secondary orders should not be the same"); doAssert((order1 != CollationElementIterator::NULLORDER), "Unexpected end of iterator reached"); iterator1->reset(); iterator2->reset(); iterator3->reset(); @@ -516,8 +516,8 @@ CollationAPITest::TestElemIter(/* char* par */) return; } - doAssert((CollationElementIterator::secondaryOrder(order1) == - CollationElementIterator::secondaryOrder(order3)), "The secondary orders should be the same"); + doAssert((CollationElementIterator::secondaryOrder(order1) != + CollationElementIterator::secondaryOrder(order3)), "The secondary orders should not be the same"); doAssert((order1 != CollationElementIterator::NULLORDER), "Unexpected end of iterator reached"); doAssert((*iterator2 != *iterator3), "The iterators should be different"); @@ -525,7 +525,7 @@ CollationAPITest::TestElemIter(/* char* par */) //test error values success=U_UNSUPPORTED_ERROR; Collator *colerror=NULL; - colerror=Collator::createInstance(success); + colerror=Collator::createInstance(Locale::ENGLISH, success); if (colerror != 0 || success == U_ZERO_ERROR){ errln("Error: createInstance(UErrorCode != U_ZERO_ERROR) should just return and not create an instance\n"); } @@ -580,7 +580,7 @@ CollationAPITest::TestOperators(/* char* par */) doAssert((*col1 == *col2), "Collator objects not equal after assignment (operator=)"); success = U_ZERO_ERROR; - Collator *col3 = Collator::createInstance(success); + Collator *col3 = Collator::createInstance(Locale::ENGLISH, success); if (U_FAILURE(success)) { errln("Default collation creation failed."); return; @@ -642,7 +642,7 @@ void CollationAPITest::TestDuplicate(/* char* par */) { UErrorCode status = U_ZERO_ERROR; - Collator *col1 = Collator::createInstance(status); + Collator *col1 = Collator::createInstance(Locale::ENGLISH, status); if (U_FAILURE(status)) { logln("Default collator creation failed."); return; @@ -665,7 +665,7 @@ CollationAPITest::TestCompare(/* char* par */) logln("The compare tests begin : "); Collator *col = 0; UErrorCode success = U_ZERO_ERROR; - col = Collator::createInstance(success); + col = Collator::createInstance(Locale::ENGLISH, success); if (U_FAILURE(success)) { errln("Default collation creation failed."); return; diff --git a/icu4c/source/test/intltest/g7coll.cpp b/icu4c/source/test/intltest/g7coll.cpp index 59a957e6418..0a16c93bf7a 100644 --- a/icu4c/source/test/intltest/g7coll.cpp +++ b/icu4c/source/test/intltest/g7coll.cpp @@ -180,7 +180,7 @@ void G7CollationTest::TestDemo1(/* char* par */) { logln("Demo Test 1 : Create a new table collation with rules \"& Z < p, P\""); UErrorCode status = U_ZERO_ERROR; - Collator *col = Collator::createInstance(status); + Collator *col = Collator::createInstance("en_US", status); const UnicodeString baseRules = ((RuleBasedCollator*)col)->getRules(); UnicodeString newRules(" & Z < p, P"); newRules.insert(0, baseRules); @@ -209,7 +209,7 @@ void G7CollationTest::TestDemo2(/* char* par */) { logln("Demo Test 2 : Create a new table collation with rules \"& C < ch , cH, Ch, CH\""); UErrorCode status = U_ZERO_ERROR; - Collator *col = Collator::createInstance(status); + Collator *col = Collator::createInstance("en_US", status); const UnicodeString baseRules = ((RuleBasedCollator*)col)->getRules(); UnicodeString newRules("& C < ch , cH, Ch, CH"); newRules.insert(0, baseRules); @@ -238,7 +238,7 @@ void G7CollationTest::TestDemo3(/* char* par */) { logln("Demo Test 3 : Create a new table collation with rules \"& Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&'\""); UErrorCode status = U_ZERO_ERROR; - Collator *col = Collator::createInstance(status); + Collator *col = Collator::createInstance("en_US", status); const UnicodeString baseRules = ((RuleBasedCollator*)col)->getRules(); UnicodeString newRules = "& Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&'"; newRules.insert(0, baseRules); @@ -267,7 +267,7 @@ void G7CollationTest::TestDemo4(/* char* par */) { logln("Demo Test 4 : Create a new table collation with rules \" & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-' \""); UErrorCode status = U_ZERO_ERROR; - Collator *col = Collator::createInstance(status); + Collator *col = Collator::createInstance("en_US", status); const UnicodeString baseRules = ((RuleBasedCollator*)col)->getRules(); UnicodeString newRules = " & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-' "; newRules.insert(0, baseRules); diff --git a/icu4c/source/test/intltest/mnkytst.cpp b/icu4c/source/test/intltest/mnkytst.cpp index 560c47c3214..0353aec8141 100644 --- a/icu4c/source/test/intltest/mnkytst.cpp +++ b/icu4c/source/test/intltest/mnkytst.cpp @@ -44,7 +44,7 @@ CollationMonkeyTest::CollationMonkeyTest() : myCollator(0) { UErrorCode status = U_ZERO_ERROR; - myCollator = Collator::createInstance(status); + myCollator = Collator::createInstance("en_US", status); } CollationMonkeyTest::~CollationMonkeyTest() @@ -229,7 +229,7 @@ void CollationMonkeyTest::TestRules(/* char* par */){ int i=0; logln("Demo Test 1 : Create a new table collation with rules \"& z < 0x00e4\""); UErrorCode status = U_ZERO_ERROR; - Collator *col = Collator::createInstance(status); + Collator *col = Collator::createInstance("en_US", status); const UnicodeString baseRules = ((RuleBasedCollator*)col)->getRules(); UnicodeString newRules(" & z < "); newRules.append((UChar)0x00e4); diff --git a/icu4c/source/test/intltest/regcoll.cpp b/icu4c/source/test/intltest/regcoll.cpp index 2df5c4951d0..6daa68a48ec 100644 --- a/icu4c/source/test/intltest/regcoll.cpp +++ b/icu4c/source/test/intltest/regcoll.cpp @@ -31,7 +31,7 @@ static UErrorCode status = U_ZERO_ERROR; const UnicodeString CollationRegressionTest::test1 = "XFILE What subset of all possible test cases has the highest probability of detecting the most errors?"; -const UnicodeString CollationRegressionTest::test2 = "Xf ile What subset of all possible test cases has the lowest probability of detecting the least errors?"; +const UnicodeString CollationRegressionTest::test2 = "Xf_ile What subset of all possible test cases has the lowest probability of detecting the least errors?"; const UChar chars3[] = {0x61, 0x00FC, 0x62, 0x65, 0x63, 0x6b, 0x20, 0x47, 0x72, 0x00F6, 0x00DF, 0x65, 0x20, 0x4c, 0x00FC, 0x62, 0x63, 0x6b, 0}; const UnicodeString CollationRegressionTest::test3(chars3); @@ -242,7 +242,7 @@ void CollationRegressionTest::Test4058613(/* char* par */) Collator *c = NULL; - c = Collator::createInstance(status); + c = Collator::createInstance("en_US", status); if (c == NULL || U_FAILURE(status)) { diff --git a/icu4c/source/test/intltest/tscoll.cpp b/icu4c/source/test/intltest/tscoll.cpp index b4acc921702..3ec471569cb 100644 --- a/icu4c/source/test/intltest/tscoll.cpp +++ b/icu4c/source/test/intltest/tscoll.cpp @@ -130,12 +130,9 @@ void IntlTestCollator::runIndexedTest( int32_t index, UBool exec, const char* &n if (exec) { logln("CollationKanatest---"); - logln("Temporary removed"); - - /* + CollationKanaTest test; callTest( test, par ); - */ } break; @@ -207,12 +204,9 @@ void IntlTestCollator::runIndexedTest( int32_t index, UBool exec, const char* &n if (exec) { logln("CollationRegressionTest---"); - logln("Temporary removed"); - - /* + CollationRegressionTest test; callTest( test, par ); - */ } break; @@ -236,10 +230,8 @@ void IntlTestCollator::runIndexedTest( int32_t index, UBool exec, const char* &n { logln("CollationIteratorTest---"); - /* CollationIteratorTest test; callTest( test, par ); - */ } break;