2000-01-15 02:00:06 +00:00
|
|
|
/********************************************************************
|
|
|
|
* COPYRIGHT:
|
2005-06-07 23:38:09 +00:00
|
|
|
* Copyright (c) 1997-2005, International Business Machines Corporation and
|
2000-01-15 02:00:06 +00:00
|
|
|
* others. All Rights Reserved.
|
|
|
|
********************************************************************/
|
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* IntlTestUtilities is the medium level test class for everything in the directory "utility".
|
|
|
|
*/
|
|
|
|
|
1999-12-28 23:57:50 +00:00
|
|
|
#include "unicode/utypes.h"
|
1999-08-16 21:50:52 +00:00
|
|
|
#include "itutil.h"
|
1999-11-22 20:29:44 +00:00
|
|
|
#include "strtest.h"
|
1999-08-16 21:50:52 +00:00
|
|
|
#include "loctest.h"
|
|
|
|
#include "citrtest.h"
|
|
|
|
#include "ustrtest.h"
|
2003-02-26 23:22:03 +00:00
|
|
|
#include "ucdtest.h"
|
1999-08-16 21:50:52 +00:00
|
|
|
#include "restest.h"
|
2000-05-15 18:39:17 +00:00
|
|
|
#include "restsnew.h"
|
1999-08-16 21:50:52 +00:00
|
|
|
#include "tsmthred.h"
|
|
|
|
#include "tsputil.h"
|
2002-11-27 21:20:20 +00:00
|
|
|
#include "uobjtest.h"
|
2005-05-21 01:47:26 +00:00
|
|
|
#include "utxttest.h"
|
2003-12-08 07:12:34 +00:00
|
|
|
#include "v32test.h"
|
2005-08-15 16:11:39 +00:00
|
|
|
#include "uvectest.h"
|
|
|
|
#include "aliastst.h"
|
1999-08-16 21:50:52 +00:00
|
|
|
//#include "custrtest.h"
|
|
|
|
//#include "ccitrtst.h"
|
|
|
|
//#include "cloctest.h"
|
|
|
|
//#include "ctres.h"
|
|
|
|
//#include "ctucd.h"
|
|
|
|
|
2000-08-14 21:42:36 +00:00
|
|
|
void IntlTestUtilities::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par )
|
1999-08-16 21:50:52 +00:00
|
|
|
{
|
|
|
|
if (exec) logln("TestSuite Utilities: ");
|
|
|
|
switch (index) {
|
|
|
|
case 0:
|
2002-04-25 22:15:52 +00:00
|
|
|
name = "MultithreadTest";
|
|
|
|
if (exec) {
|
|
|
|
logln("MultithreadTest---"); logln("");
|
|
|
|
MultithreadTest test;
|
|
|
|
callTest( test, par );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2003-10-04 17:55:32 +00:00
|
|
|
case 1:
|
1999-11-22 20:29:44 +00:00
|
|
|
name = "StringTest";
|
1999-08-16 21:50:52 +00:00
|
|
|
if (exec) {
|
1999-11-22 20:29:44 +00:00
|
|
|
logln("StringTest---"); logln("");
|
|
|
|
StringTest test;
|
1999-08-16 21:50:52 +00:00
|
|
|
callTest( test, par );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2003-10-04 17:55:32 +00:00
|
|
|
case 2:
|
1999-11-22 20:29:44 +00:00
|
|
|
name = "UnicodeStringTest";
|
1999-08-16 21:50:52 +00:00
|
|
|
if (exec) {
|
1999-11-22 20:29:44 +00:00
|
|
|
logln("UnicodeStringTest---"); logln("");
|
|
|
|
UnicodeStringTest test;
|
1999-08-16 21:50:52 +00:00
|
|
|
callTest( test, par );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2003-10-04 17:55:32 +00:00
|
|
|
case 3:
|
1999-11-22 20:29:44 +00:00
|
|
|
name = "LocaleTest";
|
1999-08-16 21:50:52 +00:00
|
|
|
if (exec) {
|
1999-11-22 20:29:44 +00:00
|
|
|
logln("LocaleTest---"); logln("");
|
|
|
|
LocaleTest test;
|
1999-08-16 21:50:52 +00:00
|
|
|
callTest( test, par );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2003-10-04 17:55:32 +00:00
|
|
|
case 4:
|
1999-11-22 20:29:44 +00:00
|
|
|
name = "CharIterTest";
|
|
|
|
if (exec) {
|
|
|
|
logln("CharIterTest---"); logln("");
|
|
|
|
CharIterTest test;
|
|
|
|
callTest( test, par );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2003-10-04 17:55:32 +00:00
|
|
|
case 5:
|
2003-02-26 23:22:03 +00:00
|
|
|
name = "UnicodeTest";
|
|
|
|
if (exec) {
|
|
|
|
logln("UnicodeTest---"); logln("");
|
|
|
|
UnicodeTest test;
|
|
|
|
callTest( test, par );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2003-10-04 17:55:32 +00:00
|
|
|
case 6:
|
1999-08-16 21:50:52 +00:00
|
|
|
name = "ResourceBundleTest";
|
|
|
|
if (exec) {
|
|
|
|
logln("ResourceBundleTest---"); logln("");
|
|
|
|
ResourceBundleTest test;
|
|
|
|
callTest( test, par );
|
|
|
|
}
|
|
|
|
break;
|
2003-10-04 17:55:32 +00:00
|
|
|
case 7:
|
2000-05-15 18:39:17 +00:00
|
|
|
name = "NewResourceBundleTest";
|
|
|
|
if (exec) {
|
|
|
|
logln("NewResourceBundleTest---"); logln("");
|
|
|
|
NewResourceBundleTest test;
|
|
|
|
callTest( test, par );
|
|
|
|
}
|
|
|
|
break;
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2003-10-04 17:55:32 +00:00
|
|
|
case 8:
|
1999-08-16 21:50:52 +00:00
|
|
|
name = "PUtilTest";
|
|
|
|
if (exec) {
|
|
|
|
logln("PUtilTest---"); logln("");
|
|
|
|
PUtilTest test;
|
|
|
|
callTest( test, par );
|
|
|
|
}
|
|
|
|
break;
|
2002-11-27 21:20:20 +00:00
|
|
|
|
2003-10-04 17:55:32 +00:00
|
|
|
case 9:
|
|
|
|
name = "UObjectTest";
|
|
|
|
if(exec) {
|
|
|
|
logln ("UObjectTest---"); logln("");
|
|
|
|
UObjectTest test;
|
|
|
|
callTest( test, par );
|
|
|
|
}
|
|
|
|
break;;
|
2002-03-29 18:58:48 +00:00
|
|
|
|
2003-12-08 07:12:34 +00:00
|
|
|
case 10:
|
|
|
|
name = "UVector32Test";
|
|
|
|
if(exec) {
|
|
|
|
logln ("UVector32Test---"); logln("");
|
|
|
|
UVector32Test test;
|
|
|
|
callTest( test, par );
|
|
|
|
}
|
|
|
|
break;;
|
|
|
|
|
2004-12-20 23:10:09 +00:00
|
|
|
case 11:
|
|
|
|
name = "UVectorTest";
|
|
|
|
if(exec) {
|
|
|
|
logln ("UVectorTest---"); logln("");
|
|
|
|
UVectorTest test;
|
|
|
|
callTest( test, par );
|
|
|
|
}
|
|
|
|
break;;
|
|
|
|
|
2005-05-21 01:47:26 +00:00
|
|
|
case 12:
|
|
|
|
name = "UTextTest";
|
|
|
|
if(exec) {
|
|
|
|
logln ("UTextTest---"); logln("");
|
|
|
|
UTextTest test;
|
|
|
|
callTest( test, par );
|
|
|
|
}
|
2005-08-15 16:11:39 +00:00
|
|
|
break;
|
2005-05-21 01:47:26 +00:00
|
|
|
|
2005-08-15 16:11:39 +00:00
|
|
|
case 13:
|
|
|
|
name = "LocaleAliasTest";
|
1999-08-16 21:50:52 +00:00
|
|
|
if (exec) {
|
2005-08-15 16:11:39 +00:00
|
|
|
logln("LocaleAliasTest---"); logln("");
|
|
|
|
LocaleAliasTest test;
|
1999-08-16 21:50:52 +00:00
|
|
|
callTest( test, par );
|
|
|
|
}
|
|
|
|
break;
|
2005-08-15 16:11:39 +00:00
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
default: name = ""; break; //needed to end loop
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|