ICU-1007 move normalization tests from collate into a new main branch 'normalize'

X-SVN-Rev: 5671
This commit is contained in:
Markus Scherer 2001-08-31 23:01:58 +00:00
parent acd4727bf3
commit 49772946c8
3 changed files with 67 additions and 51 deletions

View file

@ -24,6 +24,17 @@
#include "itconv.h"
#include "ittrans.h"
#include "itrbbi.h"
#include "normconf.h"
#include "tstnorm.h"
#define CASE_SUITE(id, suite) case id: \
name = #suite; \
if(exec) { \
logln(#suite "---"); \
suite test; \
callTest(test, par); \
} \
break
void MajorTestLevel::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par )
{
@ -36,48 +47,57 @@ void MajorTestLevel::runIndexedTest( int32_t index, UBool exec, const char* &nam
}
break;
case 1: name = "collate";
case 1: name = "convert";
if (exec) {
logln("TestSuite Collator----"); logln();
IntlTestCollator test;
callTest( test, par );
}
break;
case 2: name = "textbounds";
if (exec) {
logln("TestSuite TextBoundary----"); logln();
IntlTestTextBoundary test;
callTest( test, par );
}
break;
case 3: name = "format";
if (exec) {
logln("TestSuite Format----"); logln();
IntlTestFormat test;
callTest( test, par );
}
break;
case 4: name = "convert";
if (exec) {
logln("TestSuite Convert----"); logln();
logln("TestSuite Convert---"); logln();
IntlTestConvert test;
callTest( test, par );
}
break;
case 5: name = "translit";
case 2: name = "normalize";
if (exec) {
logln("TestSuite Transliterator----"); logln();
logln("TestSuite Normalize---"); logln();
IntlTestNormalize test;
callTest( test, par );
}
break;
case 3: name = "collate";
if (exec) {
logln("TestSuite Collator---"); logln();
IntlTestCollator test;
callTest( test, par );
}
break;
case 4: name = "textbounds";
if (exec) {
logln("TestSuite TextBoundary---"); logln();
IntlTestTextBoundary test;
callTest( test, par );
}
break;
case 5: name = "format";
if (exec) {
logln("TestSuite Format---"); logln();
IntlTestFormat test;
callTest( test, par );
}
break;
case 6: name = "translit";
if (exec) {
logln("TestSuite Transliterator---"); logln();
IntlTestTransliterator test;
callTest( test, par );
}
break;
case 6: name = "rbbi";
case 7: name = "rbbi";
if (exec) {
logln("TestSuite RuleBasedBreakIterator----"); logln();
logln("TestSuite RuleBasedBreakIterator---"); logln();
IntlTestRBBI test;
callTest( test, par );
}
@ -87,3 +107,14 @@ void MajorTestLevel::runIndexedTest( int32_t index, UBool exec, const char* &nam
}
}
void IntlTestNormalize::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par )
{
if(exec) logln("TestSuite Normalize:");
switch (index) {
CASE_SUITE(0, NormalizerConformanceTest);
CASE_SUITE(1, BasicNormalizerTest);
default:
name="";
break;
}
}

View file

@ -19,4 +19,8 @@ class MajorTestLevel: public IntlTest {
void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
};
class IntlTestNormalize: public IntlTest {
void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
};
#endif

View file

@ -246,25 +246,6 @@ void IntlTestCollator::runIndexedTest( int32_t index, UBool exec, const char* &n
break;
case 16: */
name = "BasicNormalizerTest";
if (exec) {
logln("BasicNormalizerTest---");
logln("");
BasicNormalizerTest test;
callTest( test, par );
}
break;
case 16:
name = "NormalizerConformanceTest";
if (exec) {
logln("NormalizerConformanceTest---"); logln("");
NormalizerConformanceTest test;
callTest( test, par );
}
break;
case 17:
name = "CollationThaiTest";
if (exec) {
logln("CollationThaiTest---");
@ -274,7 +255,7 @@ void IntlTestCollator::runIndexedTest( int32_t index, UBool exec, const char* &n
}
break;
case 18: //all
case 16: //all
name = "LotusCollationTest";
name = "LotusCollationKoreanTest";
@ -285,7 +266,7 @@ void IntlTestCollator::runIndexedTest( int32_t index, UBool exec, const char* &n
}
break;
case 19:
case 17:
name = "StringSearchTest";
if (exec) {
logln("StringSearchTest---");