ICU-1003 removing incremental compare from intltest

X-SVN-Rev: 5020
This commit is contained in:
Vladimir Weinstein 2001-06-19 21:16:48 +00:00
parent c705ce052b
commit 9268bcb6a4
14 changed files with 14 additions and 59 deletions

View File

@ -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");
}

View File

@ -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 );
}
}

View File

@ -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 */)

View File

@ -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 */)

View File

@ -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 */)

View File

@ -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 */)

View File

@ -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 */)

View File

@ -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 */)

View File

@ -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 */)

View File

@ -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 */)

View File

@ -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 */)

View File

@ -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*/ )

View File

@ -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 );
}
}

View File

@ -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 */)