2000-03-10 00:42:27 +00:00
|
|
|
/********************************************************************
|
|
|
|
* COPYRIGHT:
|
2001-03-21 20:09:56 +00:00
|
|
|
* Copyright (c) 1998-2001, International Business Machines Corporation and
|
2000-03-10 00:42:27 +00:00
|
|
|
* others. All Rights Reserved.
|
|
|
|
********************************************************************/
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* MajorTestLevel is the top level test class for everything in the directory "IntlWork".
|
|
|
|
*/
|
|
|
|
|
2001-02-15 01:44:15 +00:00
|
|
|
/***********************************************************************
|
|
|
|
* Modification history
|
|
|
|
* Date Name Description
|
|
|
|
* 02/14/2001 synwee Release collation for testing.
|
|
|
|
***********************************************************************/
|
|
|
|
|
1999-12-28 23:57:50 +00:00
|
|
|
#include "unicode/utypes.h"
|
1999-08-16 21:50:52 +00:00
|
|
|
#include "itmajor.h"
|
|
|
|
|
|
|
|
#include "itutil.h"
|
|
|
|
#include "tscoll.h"
|
|
|
|
#include "ittxtbd.h"
|
|
|
|
#include "itformat.h"
|
|
|
|
#include "itconv.h"
|
2000-01-18 02:35:52 +00:00
|
|
|
#include "ittrans.h"
|
2000-01-15 01:56:11 +00:00
|
|
|
#include "itrbbi.h"
|
2001-08-31 23:01:58 +00:00
|
|
|
#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
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2000-08-14 21:42:36 +00:00
|
|
|
void MajorTestLevel::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par )
|
1999-08-16 21:50:52 +00:00
|
|
|
{
|
|
|
|
switch (index) {
|
|
|
|
case 0: name = "utility";
|
|
|
|
if (exec) {
|
|
|
|
logln("TestSuite Utilities---"); logln();
|
|
|
|
IntlTestUtilities test;
|
|
|
|
callTest( test, par );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2001-08-31 23:01:58 +00:00
|
|
|
case 1: name = "convert";
|
1999-08-16 21:50:52 +00:00
|
|
|
if (exec) {
|
2001-08-31 23:01:58 +00:00
|
|
|
logln("TestSuite Convert---"); logln();
|
|
|
|
IntlTestConvert test;
|
2001-02-15 01:44:15 +00:00
|
|
|
callTest( test, par );
|
1999-08-16 21:50:52 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2001-08-31 23:01:58 +00:00
|
|
|
case 2: name = "normalize";
|
1999-08-16 21:50:52 +00:00
|
|
|
if (exec) {
|
2001-08-31 23:01:58 +00:00
|
|
|
logln("TestSuite Normalize---"); logln();
|
|
|
|
IntlTestNormalize test;
|
1999-08-16 21:50:52 +00:00
|
|
|
callTest( test, par );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2001-08-31 23:01:58 +00:00
|
|
|
case 3: name = "collate";
|
1999-08-16 21:50:52 +00:00
|
|
|
if (exec) {
|
2001-08-31 23:01:58 +00:00
|
|
|
logln("TestSuite Collator---"); logln();
|
|
|
|
IntlTestCollator test;
|
1999-08-16 21:50:52 +00:00
|
|
|
callTest( test, par );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2001-08-31 23:01:58 +00:00
|
|
|
case 4: name = "textbounds";
|
1999-08-16 21:50:52 +00:00
|
|
|
if (exec) {
|
2001-08-31 23:01:58 +00:00
|
|
|
logln("TestSuite TextBoundary---"); logln();
|
|
|
|
IntlTestTextBoundary test;
|
1999-08-16 21:50:52 +00:00
|
|
|
callTest( test, par );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2001-08-31 23:01:58 +00:00
|
|
|
case 5: name = "format";
|
1999-11-22 17:16:10 +00:00
|
|
|
if (exec) {
|
2001-08-31 23:01:58 +00:00
|
|
|
logln("TestSuite Format---"); logln();
|
|
|
|
IntlTestFormat test;
|
|
|
|
callTest( test, par );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 6: name = "translit";
|
|
|
|
if (exec) {
|
|
|
|
logln("TestSuite Transliterator---"); logln();
|
2000-01-18 02:35:52 +00:00
|
|
|
IntlTestTransliterator test;
|
1999-11-22 17:16:10 +00:00
|
|
|
callTest( test, par );
|
|
|
|
}
|
|
|
|
break;
|
2001-08-31 23:01:58 +00:00
|
|
|
|
|
|
|
case 7: name = "rbbi";
|
2000-01-15 01:56:11 +00:00
|
|
|
if (exec) {
|
2001-08-31 23:01:58 +00:00
|
|
|
logln("TestSuite RuleBasedBreakIterator---"); logln();
|
2000-01-15 01:56:11 +00:00
|
|
|
IntlTestRBBI test;
|
|
|
|
callTest( test, par );
|
|
|
|
}
|
|
|
|
break;
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
default: name = ""; break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-08-31 23:01:58 +00:00
|
|
|
void IntlTestNormalize::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par )
|
|
|
|
{
|
|
|
|
if(exec) logln("TestSuite Normalize:");
|
|
|
|
switch (index) {
|
2001-09-11 01:28:07 +00:00
|
|
|
CASE_SUITE(0, BasicNormalizerTest);
|
|
|
|
CASE_SUITE(1, NormalizerConformanceTest); // this takes a long time
|
2001-08-31 23:01:58 +00:00
|
|
|
default:
|
|
|
|
name="";
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|