]> git.saurik.com Git - apple/icu.git/blob - icuSources/test/intltest/itutil.cpp
ICU-8.11.tar.gz
[apple/icu.git] / icuSources / test / intltest / itutil.cpp
1 /********************************************************************
2 * COPYRIGHT:
3 * Copyright (c) 1997-2005, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 ********************************************************************/
6
7
8 /**
9 * IntlTestUtilities is the medium level test class for everything in the directory "utility".
10 */
11
12 #include "unicode/utypes.h"
13 #include "itutil.h"
14 #include "strtest.h"
15 #include "loctest.h"
16 #include "citrtest.h"
17 #include "ustrtest.h"
18 #include "ucdtest.h"
19 #include "restest.h"
20 #include "restsnew.h"
21 #include "tsmthred.h"
22 #include "tsputil.h"
23 #include "uobjtest.h"
24 #include "utxttest.h"
25 #include "v32test.h"
26 #include "uvectest.h"
27 #include "aliastst.h"
28 //#include "custrtest.h"
29 //#include "ccitrtst.h"
30 //#include "cloctest.h"
31 //#include "ctres.h"
32 //#include "ctucd.h"
33
34 void IntlTestUtilities::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par )
35 {
36 if (exec) logln("TestSuite Utilities: ");
37 switch (index) {
38 case 0:
39 name = "MultithreadTest";
40 if (exec) {
41 logln("MultithreadTest---"); logln("");
42 MultithreadTest test;
43 callTest( test, par );
44 }
45 break;
46
47 case 1:
48 name = "StringTest";
49 if (exec) {
50 logln("StringTest---"); logln("");
51 StringTest test;
52 callTest( test, par );
53 }
54 break;
55
56 case 2:
57 name = "UnicodeStringTest";
58 if (exec) {
59 logln("UnicodeStringTest---"); logln("");
60 UnicodeStringTest test;
61 callTest( test, par );
62 }
63 break;
64
65 case 3:
66 name = "LocaleTest";
67 if (exec) {
68 logln("LocaleTest---"); logln("");
69 LocaleTest test;
70 callTest( test, par );
71 }
72 break;
73
74 case 4:
75 name = "CharIterTest";
76 if (exec) {
77 logln("CharIterTest---"); logln("");
78 CharIterTest test;
79 callTest( test, par );
80 }
81 break;
82
83 case 5:
84 name = "UnicodeTest";
85 if (exec) {
86 logln("UnicodeTest---"); logln("");
87 UnicodeTest test;
88 callTest( test, par );
89 }
90 break;
91
92 case 6:
93 name = "ResourceBundleTest";
94 if (exec) {
95 logln("ResourceBundleTest---"); logln("");
96 ResourceBundleTest test;
97 callTest( test, par );
98 }
99 break;
100 case 7:
101 name = "NewResourceBundleTest";
102 if (exec) {
103 logln("NewResourceBundleTest---"); logln("");
104 NewResourceBundleTest test;
105 callTest( test, par );
106 }
107 break;
108
109 case 8:
110 name = "PUtilTest";
111 if (exec) {
112 logln("PUtilTest---"); logln("");
113 PUtilTest test;
114 callTest( test, par );
115 }
116 break;
117
118 case 9:
119 name = "UObjectTest";
120 if(exec) {
121 logln ("UObjectTest---"); logln("");
122 UObjectTest test;
123 callTest( test, par );
124 }
125 break;;
126
127 case 10:
128 name = "UVector32Test";
129 if(exec) {
130 logln ("UVector32Test---"); logln("");
131 UVector32Test test;
132 callTest( test, par );
133 }
134 break;;
135
136 case 11:
137 name = "UVectorTest";
138 if(exec) {
139 logln ("UVectorTest---"); logln("");
140 UVectorTest test;
141 callTest( test, par );
142 }
143 break;;
144
145 case 12:
146 name = "UTextTest";
147 if(exec) {
148 logln ("UTextTest---"); logln("");
149 UTextTest test;
150 callTest( test, par );
151 }
152 break;
153
154 case 13:
155 name = "LocaleAliasTest";
156 if (exec) {
157 logln("LocaleAliasTest---"); logln("");
158 LocaleAliasTest test;
159 callTest( test, par );
160 }
161 break;
162
163 default: name = ""; break; //needed to end loop
164 }
165 }
166