From 9268bcb6a4d1d5467473f54067ade5727f10a4d5 Mon Sep 17 00:00:00 2001 From: Vladimir Weinstein Date: Tue, 19 Jun 2001 21:16:48 +0000 Subject: [PATCH] ICU-1003 removing incremental compare from intltest X-SVN-Rev: 5020 --- icu4c/source/test/intltest/allcoll.cpp | 8 +------- icu4c/source/test/intltest/currcoll.cpp | 5 +---- icu4c/source/test/intltest/dacoll.cpp | 5 +---- icu4c/source/test/intltest/decoll.cpp | 5 +---- icu4c/source/test/intltest/encoll.cpp | 5 +---- icu4c/source/test/intltest/escoll.cpp | 5 +---- icu4c/source/test/intltest/ficoll.cpp | 5 +---- icu4c/source/test/intltest/frcoll.cpp | 5 +---- icu4c/source/test/intltest/g7coll.cpp | 5 +---- icu4c/source/test/intltest/jacoll.cpp | 5 +---- icu4c/source/test/intltest/lcukocol.cpp | 5 +---- icu4c/source/test/intltest/mnkytst.cpp | 5 +---- icu4c/source/test/intltest/regcoll.cpp | 5 +---- icu4c/source/test/intltest/trcoll.cpp | 5 +---- 14 files changed, 14 insertions(+), 59 deletions(-) diff --git a/icu4c/source/test/intltest/allcoll.cpp b/icu4c/source/test/intltest/allcoll.cpp index 0495c63ee6..f1f533f1c9 100644 --- a/icu4c/source/test/intltest/allcoll.cpp +++ b/icu4c/source/test/intltest/allcoll.cpp @@ -91,12 +91,9 @@ void CollationDummyTest::doTestVariant(const UnicodeString source, const UnicodeString target, Collator::EComparisonResult result) { UErrorCode status = U_ZERO_ERROR; - SimpleFwdCharIterator srciterator(source); - SimpleFwdCharIterator tgtiterator(target); Collator::EComparisonResult compareResult = myCollation->compare(source, target); - Collator::EComparisonResult incResult = myCollation->compare(srciterator, - tgtiterator); + CollationKey srckey, tgtkey; myCollation->getCollationKey(source, srckey, status); myCollation->getCollationKey(target, tgtkey, status); @@ -108,9 +105,6 @@ CollationDummyTest::doTestVariant(const UnicodeString source, const UnicodeStrin if (compareResult != result) { errln("String comparison failed in variant test\n"); } - if (incResult != result) { - errln("Incremental comparison failed in variant test\n"); - } if (keyResult != result) { errln("Collation key comparison failed in variant test\n"); } diff --git a/icu4c/source/test/intltest/currcoll.cpp b/icu4c/source/test/intltest/currcoll.cpp index 1e756e1623..da02e79297 100644 --- a/icu4c/source/test/intltest/currcoll.cpp +++ b/icu4c/source/test/intltest/currcoll.cpp @@ -108,9 +108,6 @@ void CollationCurrencyTest::currencyTest(/*char *par*/) } Collator::EComparisonResult compareResult = c->compare(source, target); - SimpleFwdCharIterator src(source); - SimpleFwdCharIterator trg(target); - Collator::EComparisonResult incResult = c->compare(src, trg); CollationKey sourceKey, targetKey; UErrorCode status = U_ZERO_ERROR; @@ -133,7 +130,7 @@ void CollationCurrencyTest::currencyTest(/*char *par*/) Collator::EComparisonResult keyResult = sourceKey.compareTo(targetKey); - reportCResult( source, target, sourceKey, targetKey, compareResult, keyResult, incResult, expectedResult ); + reportCResult( source, target, sourceKey, targetKey, compareResult, keyResult, compareResult, expectedResult ); } } diff --git a/icu4c/source/test/intltest/dacoll.cpp b/icu4c/source/test/intltest/dacoll.cpp index c7743a144e..92f6e572b5 100644 --- a/icu4c/source/test/intltest/dacoll.cpp +++ b/icu4c/source/test/intltest/dacoll.cpp @@ -184,9 +184,6 @@ const UChar CollationDanishTest::testNTList[][CollationDanishTest::MAX_TOKEN_LEN void CollationDanishTest::doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result) { Collator::EComparisonResult compareResult = myCollation->compare(source, target); - SimpleFwdCharIterator src(source); - SimpleFwdCharIterator trg(target); - Collator::EComparisonResult incResult = myCollation->compare(src, trg); CollationKey sortKey1, sortKey2; UErrorCode key1status = U_ZERO_ERROR, key2status = U_ZERO_ERROR; //nos myCollation->getCollationKey(source, /*nos*/ sortKey1, key1status ); @@ -196,7 +193,7 @@ void CollationDanishTest::doTest( UnicodeString source, UnicodeString target, Co return; } Collator::EComparisonResult keyResult = sortKey1.compareTo(sortKey2); - reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, incResult, result ); + reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, compareResult, result ); } void CollationDanishTest::TestTertiary(/* char* par */) diff --git a/icu4c/source/test/intltest/decoll.cpp b/icu4c/source/test/intltest/decoll.cpp index 865b509c63..cca0dee738 100644 --- a/icu4c/source/test/intltest/decoll.cpp +++ b/icu4c/source/test/intltest/decoll.cpp @@ -101,9 +101,6 @@ void CollationGermanTest::doTest( UnicodeString source, UnicodeString target, Co return; } Collator::EComparisonResult compareResult = myCollation->compare(source, target); - SimpleFwdCharIterator src(source); - SimpleFwdCharIterator trg(target); - Collator::EComparisonResult incResult = myCollation->compare(src, trg); CollationKey sortKey1, sortKey2; UErrorCode key1status = U_ZERO_ERROR, key2status = U_ZERO_ERROR; //nos myCollation->getCollationKey(source, /*nos*/ sortKey1, key1status ); @@ -115,7 +112,7 @@ void CollationGermanTest::doTest( UnicodeString source, UnicodeString target, Co } Collator::EComparisonResult keyResult = sortKey1.compareTo(sortKey2); - reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, incResult, result ); + reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, compareResult, result ); } void CollationGermanTest::TestTertiary(/* char* par */) diff --git a/icu4c/source/test/intltest/encoll.cpp b/icu4c/source/test/intltest/encoll.cpp index ae9d14c9c5..55f6401dd6 100644 --- a/icu4c/source/test/intltest/encoll.cpp +++ b/icu4c/source/test/intltest/encoll.cpp @@ -241,9 +241,6 @@ static const UChar testMore[][CollationEnglishTest::MAX_TOKEN_LEN] = { void CollationEnglishTest::doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result) { Collator::EComparisonResult compareResult = myCollation->compare(source, target); - SimpleFwdCharIterator src(source); - SimpleFwdCharIterator trg(target); - Collator::EComparisonResult incResult = myCollation->compare(src, trg); CollationKey sortKey1, sortKey2; UErrorCode key1status = U_ZERO_ERROR, key2status = U_ZERO_ERROR; //nos myCollation->getCollationKey(source, /*nos*/ sortKey1, key1status ); @@ -255,7 +252,7 @@ void CollationEnglishTest::doTest( UnicodeString source, UnicodeString target, C } Collator::EComparisonResult keyResult = sortKey1.compareTo(sortKey2); - reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, incResult, result ); + reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, compareResult, result ); } void CollationEnglishTest::TestTertiary(/* char* par */) diff --git a/icu4c/source/test/intltest/escoll.cpp b/icu4c/source/test/intltest/escoll.cpp index cd9ecd186c..450f47b1ca 100644 --- a/icu4c/source/test/intltest/escoll.cpp +++ b/icu4c/source/test/intltest/escoll.cpp @@ -79,9 +79,6 @@ const Collator::EComparisonResult CollationSpanishTest::results[] = { void CollationSpanishTest::doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result) { Collator::EComparisonResult compareResult = myCollation->compare(source, target); - SimpleFwdCharIterator src(source); - SimpleFwdCharIterator trg(target); - Collator::EComparisonResult incResult = myCollation->compare(src, trg); CollationKey sortKey1, sortKey2; UErrorCode key1status = U_ZERO_ERROR, key2status = U_ZERO_ERROR; //nos myCollation->getCollationKey(source, /*nos*/ sortKey1, key1status ); @@ -91,7 +88,7 @@ void CollationSpanishTest::doTest( UnicodeString source, UnicodeString target, C return; } Collator::EComparisonResult keyResult = sortKey1.compareTo(sortKey2); - reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, incResult, result ); + reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, compareResult, result ); } void CollationSpanishTest::TestTertiary(/* char* par */) diff --git a/icu4c/source/test/intltest/ficoll.cpp b/icu4c/source/test/intltest/ficoll.cpp index e0057cb730..05f1863344 100644 --- a/icu4c/source/test/intltest/ficoll.cpp +++ b/icu4c/source/test/intltest/ficoll.cpp @@ -66,9 +66,6 @@ const Collator::EComparisonResult CollationFinnishTest::results[] = { void CollationFinnishTest::doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result) { Collator::EComparisonResult compareResult = myCollation->compare(source, target); - SimpleFwdCharIterator src(source); - SimpleFwdCharIterator trg(target); - Collator::EComparisonResult incResult = myCollation->compare(src, trg); CollationKey sortKey1, sortKey2; UErrorCode key1status = U_ZERO_ERROR, key2status = U_ZERO_ERROR; //nos myCollation->getCollationKey(source, /*nos*/ sortKey1, key1status ); @@ -78,7 +75,7 @@ void CollationFinnishTest::doTest( UnicodeString source, UnicodeString target, C return; } Collator::EComparisonResult keyResult = sortKey1.compareTo(sortKey2); - reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, incResult, result ); + reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, compareResult, result ); } void CollationFinnishTest::TestTertiary(/* char* par */) diff --git a/icu4c/source/test/intltest/frcoll.cpp b/icu4c/source/test/intltest/frcoll.cpp index bbb3e3d353..8b91357b0b 100644 --- a/icu4c/source/test/intltest/frcoll.cpp +++ b/icu4c/source/test/intltest/frcoll.cpp @@ -133,9 +133,6 @@ const UChar CollationFrenchTest::testBugs[][CollationFrenchTest::MAX_TOKEN_LEN] void CollationFrenchTest::doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result) { Collator::EComparisonResult compareResult = myCollation->compare(source, target); - SimpleFwdCharIterator src(source); - SimpleFwdCharIterator trg(target); - Collator::EComparisonResult incResult = myCollation->compare(src, trg); CollationKey sortKey1, sortKey2; UErrorCode key1status = U_ZERO_ERROR, key2status = U_ZERO_ERROR; //nos myCollation->getCollationKey(source, /*nos*/ sortKey1, key1status ); @@ -147,7 +144,7 @@ void CollationFrenchTest::doTest( UnicodeString source, UnicodeString target, Co } Collator::EComparisonResult keyResult = sortKey1.compareTo(sortKey2); - reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, incResult, result ); + reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, compareResult, result ); } void CollationFrenchTest::TestTertiary(/* char* par */) diff --git a/icu4c/source/test/intltest/g7coll.cpp b/icu4c/source/test/intltest/g7coll.cpp index 7d57c16b52..aaae186583 100644 --- a/icu4c/source/test/intltest/g7coll.cpp +++ b/icu4c/source/test/intltest/g7coll.cpp @@ -101,9 +101,6 @@ const int32_t G7CollationTest::results[G7CollationTest::TESTLOCALES][G7Collation void G7CollationTest::doTest( Collator* myCollation, UnicodeString source, UnicodeString target, Collator::EComparisonResult result) { Collator::EComparisonResult compareResult = myCollation->compare(source, target); - SimpleFwdCharIterator src(source); - SimpleFwdCharIterator trg(target); - Collator::EComparisonResult incResult = myCollation->compare(src, trg); CollationKey sortKey1, sortKey2; UErrorCode key1status = U_ZERO_ERROR, key2status = U_ZERO_ERROR; //nos myCollation->getCollationKey(source, /*nos*/ sortKey1, key1status ); @@ -113,7 +110,7 @@ void G7CollationTest::doTest( Collator* myCollation, UnicodeString source, Unico return; } Collator::EComparisonResult keyResult = sortKey1.compareTo(sortKey2); - reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, incResult, result ); + reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, compareResult, result ); } void G7CollationTest::TestG7Locales(/* char* par */) diff --git a/icu4c/source/test/intltest/jacoll.cpp b/icu4c/source/test/intltest/jacoll.cpp index a68a6c6690..dd36c26708 100644 --- a/icu4c/source/test/intltest/jacoll.cpp +++ b/icu4c/source/test/intltest/jacoll.cpp @@ -115,9 +115,6 @@ const UChar CollationKanaTest::testChooonKigooCases[][CollationKanaTest::MAX_TOK void CollationKanaTest::doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result) { Collator::EComparisonResult compareResult = myCollation->compare(source, target); - SimpleFwdCharIterator src(source); - SimpleFwdCharIterator trg(target); - Collator::EComparisonResult incResult = myCollation->compare(src, trg); CollationKey sortKey1, sortKey2; UErrorCode key1status = U_ZERO_ERROR, key2status = U_ZERO_ERROR; //nos myCollation->getCollationKey(source, /*nos*/ sortKey1, key1status ); @@ -127,7 +124,7 @@ void CollationKanaTest::doTest( UnicodeString source, UnicodeString target, Coll return; } Collator::EComparisonResult keyResult = sortKey1.compareTo(sortKey2); - reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, incResult, result ); + reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, compareResult, result ); } void CollationKanaTest::TestTertiary(/* char* par */) diff --git a/icu4c/source/test/intltest/lcukocol.cpp b/icu4c/source/test/intltest/lcukocol.cpp index 8f9dff0ed1..424b458885 100644 --- a/icu4c/source/test/intltest/lcukocol.cpp +++ b/icu4c/source/test/intltest/lcukocol.cpp @@ -52,9 +52,6 @@ const Collator::EComparisonResult LotusCollationKoreanTest::results[] = { void LotusCollationKoreanTest::doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result) { Collator::EComparisonResult compareResult = myCollation->compare(source, target); - SimpleFwdCharIterator src(source); - SimpleFwdCharIterator trg(target); - Collator::EComparisonResult incResult = myCollation->compare(src, trg); CollationKey sortKey1, sortKey2; UErrorCode key1status = U_ZERO_ERROR, key2status = U_ZERO_ERROR; //nos myCollation->getCollationKey(source, /*nos*/ sortKey1, key1status ); @@ -64,7 +61,7 @@ void LotusCollationKoreanTest::doTest( UnicodeString source, UnicodeString targe return; } Collator::EComparisonResult keyResult = sortKey1.compareTo(sortKey2); - reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, incResult, result ); + reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, compareResult, result ); } void LotusCollationKoreanTest::TestTertiary(/* char* par */) diff --git a/icu4c/source/test/intltest/mnkytst.cpp b/icu4c/source/test/intltest/mnkytst.cpp index c1ce11cd85..28a7d452c5 100644 --- a/icu4c/source/test/intltest/mnkytst.cpp +++ b/icu4c/source/test/intltest/mnkytst.cpp @@ -264,9 +264,6 @@ void CollationMonkeyTest::TestRules(/* char* par */){ void CollationMonkeyTest::doTest(RuleBasedCollator *myCollation, UnicodeString mysource, UnicodeString target, Collator::EComparisonResult result) { Collator::EComparisonResult compareResult = myCollation->compare(source, target); - SimpleFwdCharIterator src(source); - SimpleFwdCharIterator trg(target); - Collator::EComparisonResult incResult = myCollation->compare(src, trg); CollationKey sortKey1, sortKey2; UErrorCode key1status = U_ZERO_ERROR, key2status = U_ZERO_ERROR; //nos myCollation->getCollationKey(source, /*nos*/ sortKey1, key1status ); @@ -278,7 +275,7 @@ void CollationMonkeyTest::doTest(RuleBasedCollator *myCollation, UnicodeString m } Collator::EComparisonResult keyResult = sortKey1.compareTo(sortKey2); - reportCResult( mysource, target, sortKey1, sortKey2, compareResult, keyResult, incResult, result ); + reportCResult( mysource, target, sortKey1, sortKey2, compareResult, keyResult, compareResult, result ); } void CollationMonkeyTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) diff --git a/icu4c/source/test/intltest/regcoll.cpp b/icu4c/source/test/intltest/regcoll.cpp index f2d98c276f..7eda10279a 100644 --- a/icu4c/source/test/intltest/regcoll.cpp +++ b/icu4c/source/test/intltest/regcoll.cpp @@ -1089,9 +1089,6 @@ void CollationRegressionTest::compareArray(Collator &c, } Collator::EComparisonResult compareResult = c.compare(source, target); - SimpleFwdCharIterator src(source); - SimpleFwdCharIterator trg(target); - Collator::EComparisonResult incResult = c.compare(src, trg); CollationKey sourceKey, targetKey; UErrorCode status = U_ZERO_ERROR; @@ -1114,7 +1111,7 @@ void CollationRegressionTest::compareArray(Collator &c, Collator::EComparisonResult keyResult = sourceKey.compareTo(targetKey); - reportCResult( source, target, sourceKey, targetKey, compareResult, keyResult, incResult, expectedResult ); + reportCResult( source, target, sourceKey, targetKey, compareResult, keyResult, compareResult, expectedResult ); } } diff --git a/icu4c/source/test/intltest/trcoll.cpp b/icu4c/source/test/intltest/trcoll.cpp index 4cb5ed928d..30147f2c93 100644 --- a/icu4c/source/test/intltest/trcoll.cpp +++ b/icu4c/source/test/intltest/trcoll.cpp @@ -83,9 +83,6 @@ const Collator::EComparisonResult CollationTurkishTest::results[] = { void CollationTurkishTest::doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result) { Collator::EComparisonResult compareResult = myCollation->compare(source, target); - SimpleFwdCharIterator src(source); - SimpleFwdCharIterator trg(target); - Collator::EComparisonResult incResult = myCollation->compare(src, trg); CollationKey sortKey1, sortKey2; UErrorCode key1status = U_ZERO_ERROR, key2status = U_ZERO_ERROR; //nos myCollation->getCollationKey(source, /*nos*/ sortKey1, key1status ); @@ -95,7 +92,7 @@ void CollationTurkishTest::doTest( UnicodeString source, UnicodeString target, C return; } Collator::EComparisonResult keyResult = sortKey1.compareTo(sortKey2); - reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, incResult, result ); + reportCResult( source, target, sortKey1, sortKey2, compareResult, keyResult, compareResult, result ); } void CollationTurkishTest::TestTertiary(/* char* par */)