| OLD | NEW |
| 1 /******************************************************************** | 1 /******************************************************************** |
| 2 * COPYRIGHT: | 2 * COPYRIGHT: |
| 3 * Copyright (c) 1997-2013, International Business Machines Corporation and | 3 * Copyright (c) 1997-2014, International Business Machines Corporation and |
| 4 * others. All Rights Reserved. | 4 * others. All Rights Reserved. |
| 5 ********************************************************************/ | 5 ********************************************************************/ |
| 6 | 6 |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * IntlTest is a base class for tests. */ | 9 * IntlTest is a base class for tests. */ |
| 10 | 10 |
| 11 #ifndef _INTLTEST | 11 #ifndef _INTLTEST |
| 12 #define _INTLTEST | 12 #define _INTLTEST |
| 13 | 13 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 if (index == testCaseAutoNumber++) { \ | 110 if (index == testCaseAutoNumber++) { \ |
| 111 name = #test; \ | 111 name = #test; \ |
| 112 if (exec) { \ | 112 if (exec) { \ |
| 113 logln(#test "---"); \ | 113 logln(#test "---"); \ |
| 114 logln(); \ | 114 logln(); \ |
| 115 test(); \ | 115 test(); \ |
| 116 } \ | 116 } \ |
| 117 break; \ | 117 break; \ |
| 118 } | 118 } |
| 119 | 119 |
| 120 #define TESTCASE_AUTO_CLASS(TestClass) \ |
| 121 if (index == testCaseAutoNumber++) { \ |
| 122 name = #TestClass; \ |
| 123 if (exec) { \ |
| 124 logln(#TestClass "---"); \ |
| 125 logln(); \ |
| 126 TestClass test; \ |
| 127 callTest(test, par); \ |
| 128 } \ |
| 129 break; \ |
| 130 } |
| 131 |
| 132 #define TESTCASE_AUTO_CREATE_CLASS(TestClass) \ |
| 133 if (index == testCaseAutoNumber++) { \ |
| 134 name = #TestClass; \ |
| 135 if (exec) { \ |
| 136 logln(#TestClass "---"); \ |
| 137 logln(); \ |
| 138 LocalPointer<IntlTest> test(create##TestClass()); \ |
| 139 callTest(*test, par); \ |
| 140 } \ |
| 141 break; \ |
| 142 } |
| 143 |
| 120 #define TESTCASE_AUTO_END \ | 144 #define TESTCASE_AUTO_END \ |
| 121 name = ""; \ | 145 name = ""; \ |
| 122 break; \ | 146 break; \ |
| 123 } | 147 } |
| 124 | 148 |
| 125 #define TEST_ASSERT_TRUE(x) \ | 149 #define TEST_ASSERT_TRUE(x) \ |
| 126 assertTrue(#x, (x), FALSE, FALSE, __FILE__, __LINE__) | 150 assertTrue(#x, (x), FALSE, FALSE, __FILE__, __LINE__) |
| 127 | 151 |
| 128 #define TEST_ASSERT_STATUS(x) \ | 152 #define TEST_ASSERT_STATUS(x) \ |
| 129 assertSuccess(#x, (x), FALSE, __FILE__, __LINE__) | 153 assertSuccess(#x, (x), FALSE, __FILE__, __LINE__) |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 public: | 364 public: |
| 341 static void setICU_DATA(); // Set up ICU_DATA if necessary. | 365 static void setICU_DATA(); // Set up ICU_DATA if necessary. |
| 342 | 366 |
| 343 static const char* pathToDataDirectory(); | 367 static const char* pathToDataDirectory(); |
| 344 | 368 |
| 345 public: | 369 public: |
| 346 UBool run_phase2( char* name, char* par ); // internally, supports reporting
memory leaks | 370 UBool run_phase2( char* name, char* par ); // internally, supports reporting
memory leaks |
| 347 static const char* loadTestData(UErrorCode& err); | 371 static const char* loadTestData(UErrorCode& err); |
| 348 virtual const char* getTestDataPath(UErrorCode& err); | 372 virtual const char* getTestDataPath(UErrorCode& err); |
| 349 static const char* getSourceTestData(UErrorCode& err); | 373 static const char* getSourceTestData(UErrorCode& err); |
| 374 static char *getUnidataPath(char path[]); |
| 350 | 375 |
| 351 // static members | 376 // static members |
| 352 public: | 377 public: |
| 353 static IntlTest* gTest; | 378 static IntlTest* gTest; |
| 354 static const char* fgDataDir; | 379 static const char* fgDataDir; |
| 355 | 380 |
| 356 }; | 381 }; |
| 357 | 382 |
| 358 void it_log( UnicodeString message ); | 383 void it_log( UnicodeString message ); |
| 359 void it_logln( UnicodeString message ); | 384 void it_logln( UnicodeString message ); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 371 * This is a variant of cintltst/ccolltst.c:CharsToUChars(). | 396 * This is a variant of cintltst/ccolltst.c:CharsToUChars(). |
| 372 * It converts a character string into a UnicodeString, with | 397 * It converts a character string into a UnicodeString, with |
| 373 * unescaping \u sequences. | 398 * unescaping \u sequences. |
| 374 */ | 399 */ |
| 375 extern UnicodeString CharsToUnicodeString(const char* chars); | 400 extern UnicodeString CharsToUnicodeString(const char* chars); |
| 376 | 401 |
| 377 /* alias for CharsToUnicodeString */ | 402 /* alias for CharsToUnicodeString */ |
| 378 extern UnicodeString ctou(const char* chars); | 403 extern UnicodeString ctou(const char* chars); |
| 379 | 404 |
| 380 #endif // _INTLTEST | 405 #endif // _INTLTEST |
| OLD | NEW |