| OLD | NEW |
| 1 /******************************************************************** | 1 /******************************************************************** |
| 2 * COPYRIGHT: | 2 * COPYRIGHT: |
| 3 * Copyright (c) 1997-2012, 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 * IntlTestUtilities is the medium level test class for everything in the direct
ory "utility". | 9 * IntlTestUtilities is the medium level test class for everything in the direct
ory "utility". |
| 10 */ | 10 */ |
| 11 | 11 |
| 12 #include "unicode/utypes.h" | 12 #include "unicode/utypes.h" |
| 13 #include "unicode/errorcode.h" | 13 #include "unicode/errorcode.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 26 #include "utxttest.h" | 26 #include "utxttest.h" |
| 27 #include "v32test.h" | 27 #include "v32test.h" |
| 28 #include "uvectest.h" | 28 #include "uvectest.h" |
| 29 #include "aliastst.h" | 29 #include "aliastst.h" |
| 30 #include "usettest.h" | 30 #include "usettest.h" |
| 31 | 31 |
| 32 extern IntlTest *createBytesTrieTest(); | 32 extern IntlTest *createBytesTrieTest(); |
| 33 static IntlTest *createLocalPointerTest(); | 33 static IntlTest *createLocalPointerTest(); |
| 34 extern IntlTest *createUCharsTrieTest(); | 34 extern IntlTest *createUCharsTrieTest(); |
| 35 static IntlTest *createEnumSetTest(); | 35 static IntlTest *createEnumSetTest(); |
| 36 extern IntlTest *createSimplePatternFormatterTest(); |
| 37 extern IntlTest *createUnifiedCacheTest(); |
| 38 extern IntlTest *createQuantityFormatterTest(); |
| 36 | 39 |
| 37 #define CASE(id, test) case id: \ | 40 #define CASE(id, test) case id: \ |
| 38 name = #test; \ | 41 name = #test; \ |
| 39 if (exec) { \ | 42 if (exec) { \ |
| 40 logln(#test "---"); logln(); \ | 43 logln(#test "---"); logln(); \ |
| 41 test t; \ | 44 test t; \ |
| 42 callTest(t, par); \ | 45 callTest(t, par); \ |
| 43 } \ | 46 } \ |
| 44 break | 47 break |
| 45 | 48 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 } | 91 } |
| 89 break; | 92 break; |
| 90 case 19: | 93 case 19: |
| 91 name = "EnumSetTest"; | 94 name = "EnumSetTest"; |
| 92 if (exec) { | 95 if (exec) { |
| 93 logln("TestSuite EnumSetTest---"); logln(); | 96 logln("TestSuite EnumSetTest---"); logln(); |
| 94 LocalPointer<IntlTest> test(createEnumSetTest()); | 97 LocalPointer<IntlTest> test(createEnumSetTest()); |
| 95 callTest(*test, par); | 98 callTest(*test, par); |
| 96 } | 99 } |
| 97 break; | 100 break; |
| 101 case 20: |
| 102 name = "SimplePatternFormatterTest"; |
| 103 if (exec) { |
| 104 logln("TestSuite SimplePatternFormatterTest---"); logln(); |
| 105 LocalPointer<IntlTest> test(createSimplePatternFormatterTest()); |
| 106 callTest(*test, par); |
| 107 } |
| 108 break; |
| 109 case 21: |
| 110 name = "UnifiedCacheTest"; |
| 111 if (exec) { |
| 112 logln("TestSuite UnifiedCacheTest---"); logln(); |
| 113 LocalPointer<IntlTest> test(createUnifiedCacheTest()); |
| 114 callTest(*test, par); |
| 115 } |
| 116 break; |
| 117 case 22: |
| 118 name = "QuantityFormatterTest"; |
| 119 if (exec) { |
| 120 logln("TestSuite QuantityFormatterTest---"); logln(); |
| 121 LocalPointer<IntlTest> test(createQuantityFormatterTest()); |
| 122 callTest(*test, par); |
| 123 } |
| 124 break; |
| 98 default: name = ""; break; //needed to end loop | 125 default: name = ""; break; //needed to end loop |
| 99 } | 126 } |
| 100 } | 127 } |
| 101 | 128 |
| 102 void ErrorCodeTest::runIndexedTest(int32_t index, UBool exec, const char* &name,
char* /*par*/) { | 129 void ErrorCodeTest::runIndexedTest(int32_t index, UBool exec, const char* &name,
char* /*par*/) { |
| 103 if (exec) logln("TestSuite Utilities: "); | 130 if (exec) logln("TestSuite Utilities: "); |
| 104 switch (index) { | 131 switch (index) { |
| 105 case 0: name = "TestErrorCode"; if (exec) TestErrorCode(); break; | 132 case 0: name = "TestErrorCode"; if (exec) TestErrorCode(); break; |
| 106 case 1: name = "TestSubclass"; if (exec) TestSubclass(); break; | 133 case 1: name = "TestSubclass"; if (exec) TestSubclass(); break; |
| 107 default: name = ""; break; //needed to end loop | 134 default: name = ""; break; //needed to end loop |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 logln("remove THING1 -Value now: %d\n", flags.getAll()); | 576 logln("remove THING1 -Value now: %d\n", flags.getAll()); |
| 550 logln("get(thing1)=%d, get(thing2)=%d, get(thing3)=%d\n", flags.get
(THING1), flags.get(THING2), flags.get(THING3)); | 577 logln("get(thing1)=%d, get(thing2)=%d, get(thing3)=%d\n", flags.get
(THING1), flags.get(THING2), flags.get(THING3)); |
| 551 | 578 |
| 552 flags.clear(); | 579 flags.clear(); |
| 553 logln("clear -Value now: %d\n", flags.getAll()); | 580 logln("clear -Value now: %d\n", flags.getAll()); |
| 554 logln("get(thing1)=%d, get(thing2)=%d, get(thing3)=%d\n", flags.get
(THING1), flags.get(THING2), flags.get(THING3)); | 581 logln("get(thing1)=%d, get(thing2)=%d, get(thing3)=%d\n", flags.get
(THING1), flags.get(THING2), flags.get(THING3)); |
| 555 TEST_ASSERT_TRUE(flags.get(THING1) == FALSE); | 582 TEST_ASSERT_TRUE(flags.get(THING1) == FALSE); |
| 556 TEST_ASSERT_TRUE(flags.get(THING2) == FALSE); | 583 TEST_ASSERT_TRUE(flags.get(THING2) == FALSE); |
| 557 TEST_ASSERT_TRUE(flags.get(THING3) == FALSE); | 584 TEST_ASSERT_TRUE(flags.get(THING3) == FALSE); |
| 558 } | 585 } |
| OLD | NEW |