OLD | NEW |
1 /******************************************************************** | 1 /******************************************************************** |
2 * COPYRIGHT: | 2 * COPYRIGHT: |
3 * Copyright (c) 1997-2014, International Business Machines | 3 * Copyright (c) 1997-2015, International Business Machines |
4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
5 ********************************************************************/ | 5 ********************************************************************/ |
6 | 6 |
7 /** | 7 /** |
8 * IntlTestFormat is the medium level test class for everything in the directory
"format". | 8 * IntlTestFormat is the medium level test class for everything in the directory
"format". |
9 */ | 9 */ |
10 | 10 |
11 #include "unicode/utypes.h" | 11 #include "unicode/utypes.h" |
12 #include "unicode/localpointer.h" | 12 #include "unicode/localpointer.h" |
13 | 13 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 #include "dcfmtest.h" // DecimalFormatTest | 58 #include "dcfmtest.h" // DecimalFormatTest |
59 #include "listformattertest.h" // ListFormatterTest | 59 #include "listformattertest.h" // ListFormatterTest |
60 #include "regiontst.h" // RegionTest | 60 #include "regiontst.h" // RegionTest |
61 | 61 |
62 extern IntlTest *createCompactDecimalFormatTest(); | 62 extern IntlTest *createCompactDecimalFormatTest(); |
63 extern IntlTest *createGenderInfoTest(); | 63 extern IntlTest *createGenderInfoTest(); |
64 #if !UCONFIG_NO_BREAK_ITERATION | 64 #if !UCONFIG_NO_BREAK_ITERATION |
65 extern IntlTest *createRelativeDateTimeFormatterTest(); | 65 extern IntlTest *createRelativeDateTimeFormatterTest(); |
66 #endif | 66 #endif |
67 extern IntlTest *createMeasureFormatTest(); | 67 extern IntlTest *createMeasureFormatTest(); |
68 extern IntlTest *createScientificFormatHelperTest(); | |
69 extern IntlTest *createNumberFormatSpecificationTest(); | 68 extern IntlTest *createNumberFormatSpecificationTest(); |
| 69 extern IntlTest *createScientificNumberFormatterTest(); |
| 70 extern IntlTest *createNumberFormat2Test(); |
| 71 |
70 | 72 |
71 #define TESTCLASS(id, TestClass) \ | 73 #define TESTCLASS(id, TestClass) \ |
72 case id: \ | 74 case id: \ |
73 name = #TestClass; \ | 75 name = #TestClass; \ |
74 if (exec) { \ | 76 if (exec) { \ |
75 logln(#TestClass " test---"); \ | 77 logln(#TestClass " test---"); \ |
76 logln((UnicodeString)""); \ | 78 logln((UnicodeString)""); \ |
77 TestClass test; \ | 79 TestClass test; \ |
78 callTest(test, par); \ | 80 callTest(test, par); \ |
79 } \ | 81 } \ |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 case 47: | 179 case 47: |
178 name = "MeasureFormatTest"; | 180 name = "MeasureFormatTest"; |
179 if (exec) { | 181 if (exec) { |
180 logln("MeasureFormatTest test---"); | 182 logln("MeasureFormatTest test---"); |
181 logln((UnicodeString)""); | 183 logln((UnicodeString)""); |
182 LocalPointer<IntlTest> test(createMeasureFormatTest()); | 184 LocalPointer<IntlTest> test(createMeasureFormatTest()); |
183 callTest(*test, par); | 185 callTest(*test, par); |
184 } | 186 } |
185 break; | 187 break; |
186 case 48: | 188 case 48: |
187 name = "ScientificFormatHelperTest"; | |
188 if (exec) { | |
189 logln("ScientificFormatHelperTest test---"); | |
190 logln((UnicodeString)""); | |
191 LocalPointer<IntlTest> test(createScientificFormatHelperTest()); | |
192 callTest(*test, par); | |
193 } | |
194 break; | |
195 case 49: | |
196 name = "NumberFormatSpecificationTest"; | 189 name = "NumberFormatSpecificationTest"; |
197 if (exec) { | 190 if (exec) { |
198 logln("NumberFormatSpecificationTest test---"); | 191 logln("NumberFormatSpecificationTest test---"); |
199 logln((UnicodeString)""); | 192 logln((UnicodeString)""); |
200 LocalPointer<IntlTest> test(createNumberFormatSpecificationTest()); | 193 LocalPointer<IntlTest> test(createNumberFormatSpecificationTest()); |
201 callTest(*test, par); | 194 callTest(*test, par); |
202 } | 195 } |
203 break; | 196 break; |
| 197 case 49: |
| 198 name = "ScientificNumberFormatterTest"; |
| 199 if (exec) { |
| 200 logln("ScientificNumberFormatterTest test---"); |
| 201 logln((UnicodeString)""); |
| 202 LocalPointer<IntlTest> test(createScientificNumberFormatterTest()); |
| 203 callTest(*test, par); |
| 204 } |
| 205 break; |
| 206 case 50: |
| 207 name = "NumberFormat2Test"; |
| 208 if (exec) { |
| 209 logln("NumberFormat2Test test---"); |
| 210 logln((UnicodeString)""); |
| 211 LocalPointer<IntlTest> test(createNumberFormat2Test()); |
| 212 callTest(*test, par); |
| 213 } |
| 214 break; |
204 default: name = ""; break; //needed to end loop | 215 default: name = ""; break; //needed to end loop |
205 } | 216 } |
206 if (exec) { | 217 if (exec) { |
207 // restore saved Locale and TimeZone | 218 // restore saved Locale and TimeZone |
208 TimeZone::adoptDefault(saveDefaultTimeZone); | 219 TimeZone::adoptDefault(saveDefaultTimeZone); |
209 UErrorCode status = U_ZERO_ERROR; | 220 UErrorCode status = U_ZERO_ERROR; |
210 Locale::setDefault( saveDefaultLocale, status ); | 221 Locale::setDefault( saveDefaultLocale, status ); |
211 if (U_FAILURE(status)) { | 222 if (U_FAILURE(status)) { |
212 errln("itformat: couldn't re-set default Locale!"); | 223 errln("itformat: couldn't re-set default Locale!"); |
213 } | 224 } |
214 } | 225 } |
215 } | 226 } |
216 | 227 |
217 #endif /* #if !UCONFIG_NO_FORMATTING */ | 228 #endif /* #if !UCONFIG_NO_FORMATTING */ |
OLD | NEW |