OLD | NEW |
1 /******************************************************************** | 1 /******************************************************************** |
2 * COPYRIGHT: | 2 * COPYRIGHT: |
3 * Copyright (c) 1997-2015, 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 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #include "tzrulets.h" // TimeZoneRuleTest | 46 #include "tzrulets.h" // TimeZoneRuleTest |
47 #include "dadrcal.h" // DataDrivenCalendarTest | 47 #include "dadrcal.h" // DataDrivenCalendarTest |
48 #include "dadrfmt.h" // DataDrivenFormatTest | 48 #include "dadrfmt.h" // DataDrivenFormatTest |
49 #include "dtptngts.h" // IntlTestDateTimePatternGeneratorAPI | 49 #include "dtptngts.h" // IntlTestDateTimePatternGeneratorAPI |
50 #include "tzoffloc.h" // TimeZoneOffsetLocalTest | 50 #include "tzoffloc.h" // TimeZoneOffsetLocalTest |
51 #include "tzfmttst.h" // TimeZoneFormatTest | 51 #include "tzfmttst.h" // TimeZoneFormatTest |
52 #include "plurults.h" // PluralRulesTest | 52 #include "plurults.h" // PluralRulesTest |
53 #include "plurfmts.h" // PluralFormatTest | 53 #include "plurfmts.h" // PluralFormatTest |
54 #include "selfmts.h" // PluralFormatTest | 54 #include "selfmts.h" // PluralFormatTest |
55 #include "dtifmtts.h" // DateIntervalFormatTest | 55 #include "dtifmtts.h" // DateIntervalFormatTest |
56 #include "tufmtts.h" // TimeUnitTest | |
57 #include "locnmtst.h" // LocaleDisplayNamesTest | 56 #include "locnmtst.h" // LocaleDisplayNamesTest |
58 #include "dcfmtest.h" // DecimalFormatTest | 57 #include "dcfmtest.h" // DecimalFormatTest |
59 #include "listformattertest.h" // ListFormatterTest | 58 #include "listformattertest.h" // ListFormatterTest |
60 #include "regiontst.h" // RegionTest | 59 #include "regiontst.h" // RegionTest |
61 | 60 |
62 extern IntlTest *createCompactDecimalFormatTest(); | 61 extern IntlTest *createCompactDecimalFormatTest(); |
63 extern IntlTest *createGenderInfoTest(); | 62 extern IntlTest *createGenderInfoTest(); |
64 #if !UCONFIG_NO_BREAK_ITERATION | 63 #if !UCONFIG_NO_BREAK_ITERATION |
65 extern IntlTest *createRelativeDateTimeFormatterTest(); | 64 extern IntlTest *createRelativeDateTimeFormatterTest(); |
66 #endif | 65 #endif |
| 66 extern IntlTest *createTimeUnitTest(); |
67 extern IntlTest *createMeasureFormatTest(); | 67 extern IntlTest *createMeasureFormatTest(); |
68 extern IntlTest *createNumberFormatSpecificationTest(); | 68 extern IntlTest *createNumberFormatSpecificationTest(); |
69 extern IntlTest *createScientificNumberFormatterTest(); | 69 extern IntlTest *createScientificNumberFormatterTest(); |
70 extern IntlTest *createNumberFormat2Test(); | 70 extern IntlTest *createNumberFormat2Test(); |
71 | 71 |
72 | 72 |
73 #define TESTCLASS(id, TestClass) \ | 73 #define TESTCLASS(id, TestClass) \ |
74 case id: \ | 74 case id: \ |
75 name = #TestClass; \ | 75 name = #TestClass; \ |
76 if (exec) { \ | 76 if (exec) { \ |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 #if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION | 132 #if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION |
133 TESTCLASS(30,DataDrivenCalendarTest); | 133 TESTCLASS(30,DataDrivenCalendarTest); |
134 TESTCLASS(31,DataDrivenFormatTest); | 134 TESTCLASS(31,DataDrivenFormatTest); |
135 #endif | 135 #endif |
136 TESTCLASS(32,IntlTestDateTimePatternGeneratorAPI); | 136 TESTCLASS(32,IntlTestDateTimePatternGeneratorAPI); |
137 TESTCLASS(33,TimeZoneOffsetLocalTest); | 137 TESTCLASS(33,TimeZoneOffsetLocalTest); |
138 TESTCLASS(34,TimeZoneFormatTest); | 138 TESTCLASS(34,TimeZoneFormatTest); |
139 TESTCLASS(35,PluralRulesTest); | 139 TESTCLASS(35,PluralRulesTest); |
140 TESTCLASS(36,PluralFormatTest); | 140 TESTCLASS(36,PluralFormatTest); |
141 TESTCLASS(37,DateIntervalFormatTest); | 141 TESTCLASS(37,DateIntervalFormatTest); |
142 TESTCLASS(38,TimeUnitTest); | 142 case 38: |
| 143 name = "TimeUnitTest"; |
| 144 if (exec) { |
| 145 logln("TimeUnitTest test---"); |
| 146 logln((UnicodeString)""); |
| 147 LocalPointer<IntlTest> test(createTimeUnitTest()); |
| 148 callTest(*test, par); |
| 149 } |
| 150 break; |
143 TESTCLASS(39,SelectFormatTest); | 151 TESTCLASS(39,SelectFormatTest); |
144 TESTCLASS(40,LocaleDisplayNamesTest); | 152 TESTCLASS(40,LocaleDisplayNamesTest); |
145 #if !UCONFIG_NO_REGULAR_EXPRESSIONS | 153 #if !UCONFIG_NO_REGULAR_EXPRESSIONS |
146 TESTCLASS(41,DecimalFormatTest); | 154 TESTCLASS(41,DecimalFormatTest); |
147 #endif | 155 #endif |
148 TESTCLASS(42,ListFormatterTest); | 156 TESTCLASS(42,ListFormatterTest); |
149 case 43: | 157 case 43: |
150 name = "GenderInfoTest"; | 158 name = "GenderInfoTest"; |
151 if (exec) { | 159 if (exec) { |
152 logln("GenderInfoTest test---"); | 160 logln("GenderInfoTest test---"); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 TimeZone::adoptDefault(saveDefaultTimeZone); | 227 TimeZone::adoptDefault(saveDefaultTimeZone); |
220 UErrorCode status = U_ZERO_ERROR; | 228 UErrorCode status = U_ZERO_ERROR; |
221 Locale::setDefault( saveDefaultLocale, status ); | 229 Locale::setDefault( saveDefaultLocale, status ); |
222 if (U_FAILURE(status)) { | 230 if (U_FAILURE(status)) { |
223 errln("itformat: couldn't re-set default Locale!"); | 231 errln("itformat: couldn't re-set default Locale!"); |
224 } | 232 } |
225 } | 233 } |
226 } | 234 } |
227 | 235 |
228 #endif /* #if !UCONFIG_NO_FORMATTING */ | 236 #endif /* #if !UCONFIG_NO_FORMATTING */ |
OLD | NEW |