| OLD | NEW |
| 1 /* | 1 /* |
| 2 ******************************************************************************* | 2 ******************************************************************************* |
| 3 * Copyright (C) 2007-2014, International Business Machines Corporation and | 3 * Copyright (C) 2007-2014, International Business Machines Corporation and |
| 4 * others. All Rights Reserved. | 4 * others. All Rights Reserved. |
| 5 ******************************************************************************** | 5 ******************************************************************************** |
| 6 | 6 |
| 7 * File PLURRULTS.cpp | 7 * File PLURRULTS.cpp |
| 8 * | 8 * |
| 9 ******************************************************************************** | 9 ******************************************************************************** |
| 10 */ | 10 */ |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 }; | 118 }; |
| 119 UErrorCode status = U_ZERO_ERROR; | 119 UErrorCode status = U_ZERO_ERROR; |
| 120 | 120 |
| 121 // ======= Test constructors | 121 // ======= Test constructors |
| 122 logln("Testing PluralRules constructors"); | 122 logln("Testing PluralRules constructors"); |
| 123 | 123 |
| 124 | 124 |
| 125 logln("\n start default locale test case ..\n"); | 125 logln("\n start default locale test case ..\n"); |
| 126 | 126 |
| 127 PluralRules defRule(status); | 127 PluralRules defRule(status); |
| 128 LocalPointer<PluralRules> test(new PluralRules(status)); | 128 LocalPointer<PluralRules> test(new PluralRules(status), status); |
| 129 LocalPointer<PluralRules> newEnPlural(test->forLocale(Locale::getEnglish(),
status)); | |
| 130 if(U_FAILURE(status)) { | 129 if(U_FAILURE(status)) { |
| 131 dataerrln("ERROR: Could not create PluralRules (default) - exitting"); | 130 dataerrln("ERROR: Could not create PluralRules (default) - exitting"); |
| 132 return; | 131 return; |
| 133 } | 132 } |
| 133 LocalPointer<PluralRules> newEnPlural(test->forLocale(Locale::getEnglish(),
status), status); |
| 134 if(U_FAILURE(status)) { |
| 135 dataerrln("ERROR: Could not create PluralRules (English) - exitting"); |
| 136 return; |
| 137 } |
| 134 | 138 |
| 135 // ======= Test clone, assignment operator && == operator. | 139 // ======= Test clone, assignment operator && == operator. |
| 136 LocalPointer<PluralRules> dupRule(defRule.clone()); | 140 LocalPointer<PluralRules> dupRule(defRule.clone()); |
| 137 if (dupRule==NULL) { | 141 if (dupRule==NULL) { |
| 138 errln("ERROR: clone plural rules test failed!"); | 142 errln("ERROR: clone plural rules test failed!"); |
| 139 return; | 143 return; |
| 140 } else { | 144 } else { |
| 141 if ( *dupRule != defRule ) { | 145 if ( *dupRule != defRule ) { |
| 142 errln("ERROR: clone plural rules test failed!"); | 146 errln("ERROR: clone plural rules test failed!"); |
| 143 } | 147 } |
| (...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 991 if (actualFractionDigits != tc.fractionDigits) { | 995 if (actualFractionDigits != tc.fractionDigits) { |
| 992 errln("file %s, line %d: getFractionDigits(%g, %d): expected %ld, go
t %ld", | 996 errln("file %s, line %d: getFractionDigits(%g, %d): expected %ld, go
t %ld", |
| 993 __FILE__, __LINE__, tc.n, numFractionDigits, tc.fractionDigits
, actualFractionDigits); | 997 __FILE__, __LINE__, tc.n, numFractionDigits, tc.fractionDigits
, actualFractionDigits); |
| 994 } | 998 } |
| 995 } | 999 } |
| 996 } | 1000 } |
| 997 | 1001 |
| 998 | 1002 |
| 999 | 1003 |
| 1000 #endif /* #if !UCONFIG_NO_FORMATTING */ | 1004 #endif /* #if !UCONFIG_NO_FORMATTING */ |
| OLD | NEW |