Lines Matching refs:UnicodeString
24 if (exec) logln((UnicodeString)"TestSuite DecimalFormatAPI"); in runIndexedTest()
28 logln((UnicodeString)"DecimalFormat API test---"); logln((UnicodeString)""); in runIndexedTest()
33 … errln((UnicodeString)"ERROR: Could not set default locale, test may not give correct results"); in runIndexedTest()
41 logln((UnicodeString)"DecimalFormat Rounding test---"); in runIndexedTest()
47 logln((UnicodeString)"DecimalFormat Rounding Increment test---"); in runIndexedTest()
53 logln((UnicodeString)"CurrencyPluralInfo API test---"); in runIndexedTest()
59 logln((UnicodeString)"Scale test---"); in runIndexedTest()
77 logln((UnicodeString)"Testing DecimalFormat constructors"); in testAPI()
86 const UnicodeString pattern("#,##0.# FF"); in testAPI()
89 errln((UnicodeString)"ERROR: Could not create DecimalFormat (pattern)"); in testAPI()
96 errln((UnicodeString)"ERROR: Could not create DecimalFormatSymbols (French)"); in testAPI()
103 errln((UnicodeString)"ERROR: Could not create DecimalFormat (pattern, symbols*)"); in testAPI()
109 errln((UnicodeString)"ERROR: Could not create DecimalFormat (pattern, symbols)"); in testAPI()
116 logln((UnicodeString)"Testing clone(), assignment and equality operators"); in testAPI()
119 errln((UnicodeString)"ERROR: Copy constructor or == failed"); in testAPI()
124 errln((UnicodeString)"ERROR: Assignment (or !=) failed"); in testAPI()
129 errln((UnicodeString)"ERROR: Clone() failed"); in testAPI()
135 logln((UnicodeString)"Testing various format() methods"); in testAPI()
142 UnicodeString res1, res2, res3, res4; in testAPI()
146 logln( (UnicodeString) "" + (int32_t) d + " formatted to " + res1); in testAPI()
149 logln((UnicodeString) "" + (int32_t) l + " formatted to " + res2); in testAPI()
154 errln((UnicodeString)"ERROR: format(Formattable [double]) failed"); in testAPI()
156 logln((UnicodeString) "" + (int32_t) fD.getDouble() + " formatted to " + res3); in testAPI()
161 errln((UnicodeString)"ERROR: format(Formattable [long]) failed"); in testAPI()
163 logln((UnicodeString) "" + fL.getLong() + " formatted to " + res4); in testAPI()
167 logln((UnicodeString)"Testing parse()"); in testAPI()
169 UnicodeString text("-10,456.0037"); in testAPI()
172 UnicodeString patt("#,##0.#"); in testAPI()
176 errln((UnicodeString)"ERROR: applyPattern() failed"); in testAPI()
180 errln((UnicodeString)"ERROR: Roundtrip failed (via parse()) for " + text); in testAPI()
187 errln((UnicodeString)"ERROR: parse() failed"); in testAPI()
190 errln((UnicodeString)"ERROR: Roundtrip failed (via parse()) for " + text); in testAPI()
196 logln((UnicodeString)"Testing getters and setters"); in testAPI()
203 errln((UnicodeString)"ERROR: adopt or set DecimalFormatSymbols() failed"); in testAPI()
206 UnicodeString posPrefix; in testAPI()
209 logln((UnicodeString)"Positive prefix (should be +): " + posPrefix); in testAPI()
211 errln((UnicodeString)"ERROR: setPositivePrefix() failed"); in testAPI()
214 UnicodeString negPrefix; in testAPI()
217 logln((UnicodeString)"Negative prefix (should be -): " + negPrefix); in testAPI()
219 errln((UnicodeString)"ERROR: setNegativePrefix() failed"); in testAPI()
222 UnicodeString posSuffix; in testAPI()
225 logln((UnicodeString)"Positive suffix (should be _): " + posSuffix); in testAPI()
227 errln((UnicodeString)"ERROR: setPositiveSuffix() failed"); in testAPI()
230 UnicodeString negSuffix; in testAPI()
233 logln((UnicodeString)"Negative suffix (should be ~): " + negSuffix); in testAPI()
235 errln((UnicodeString)"ERROR: setNegativeSuffix() failed"); in testAPI()
241 logln((UnicodeString)"Multiplier (should be 8): " + multiplier); in testAPI()
243 errln((UnicodeString)"ERROR: setMultiplier() failed"); in testAPI()
249 logln((UnicodeString)"Grouping size (should be 2): " + (int32_t) groupingSize); in testAPI()
251 errln((UnicodeString)"ERROR: setGroupingSize() failed"); in testAPI()
256 …logln((UnicodeString)"DecimalSeparatorIsAlwaysShown (should be TRUE) is " + (UnicodeString) (tf ? … in testAPI()
258 errln((UnicodeString)"ERROR: setDecimalSeparatorAlwaysShown() failed"); in testAPI()
263 …logln((UnicodeString)"ExponentSignAlwaysShown (should be TRUE) is " + (UnicodeString) (esas ? "TRU… in testAPI()
265 errln((UnicodeString)"ERROR: ExponentSignAlwaysShown() failed"); in testAPI()
271 …logln((UnicodeString)"isScientificNotation (should be TRUE) is " + (UnicodeString) (sn ? "TRUE" : … in testAPI()
273 errln((UnicodeString)"ERROR: setScientificNotation() failed"); in testAPI()
280 … logln((UnicodeString)"MinimumExponentDigits (should be 2) is " + (int8_t) MinimumExponentDigits); in testAPI()
282 errln((UnicodeString)"ERROR: setMinimumExponentDigits() failed"); in testAPI()
289 logln((UnicodeString)"RoundingIncrement (should be 2.0) is " + (double) RoundingIncrement); in testAPI()
291 errln((UnicodeString)"ERROR: setRoundingIncrement() failed"); in testAPI()
295 UnicodeString funkyPat; in testAPI()
297 logln((UnicodeString)"Pattern is " + funkyPat); in testAPI()
299 UnicodeString locPat; in testAPI()
301 logln((UnicodeString)"Localized pattern is " + locPat); in testAPI()
305 logln((UnicodeString)"Testing applyPattern()"); in testAPI()
307 UnicodeString p1("#,##0.0#;(#,##0.0#)"); in testAPI()
308 logln((UnicodeString)"Applying pattern " + p1); in testAPI()
312 errln((UnicodeString)"ERROR: applyPattern() failed with " + (int32_t) status); in testAPI()
314 UnicodeString s2; in testAPI()
316 logln((UnicodeString)"Extracted pattern is " + s2); in testAPI()
318 errln((UnicodeString)"ERROR: toPattern() result did not match pattern applied"); in testAPI()
329 UnicodeString p2("#,##,##0.0# FF;(#,##,##0.0# FF)"); in testAPI()
330 logln((UnicodeString)"Applying pattern " + p2); in testAPI()
334 errln((UnicodeString)"ERROR: applyPattern() failed with " + (int32_t) status); in testAPI()
336 UnicodeString s3; in testAPI()
338 logln((UnicodeString)"Extracted pattern is " + s3); in testAPI()
340 errln((UnicodeString)"ERROR: toLocalizedPattern() result did not match pattern applied"); in testAPI()
347 … errln((UnicodeString)"ERROR: applyPattern((with ParseError)) failed with " + (int32_t) status); in testAPI()
349 UnicodeString s4; in testAPI()
351 logln((UnicodeString)"Extracted pattern is " + s4); in testAPI()
353 …errln((UnicodeString)"ERROR: toLocalizedPattern(with ParseErr) result did not match pattern applie… in testAPI()
366 logln((UnicodeString)"Testing getStaticClassID()"); in testAPI()
371 errln((UnicodeString)"ERROR: Couldn't create a DecimalFormat"); in testAPI()
375 errln((UnicodeString)"ERROR: getDynamicClassID() didn't return the expected value"); in testAPI()
386 errln((UnicodeString)"ERROR: CurrencyPluralInfo(UErrorCode) could not be created"); in TestCurrencyPluralInfo()
392 …errln((UnicodeString)"ERROR: CurrencyPluralInfo::getDynamicClassID() didn't return the expected va… in TestCurrencyPluralInfo()
397 errln((UnicodeString)"ERROR: CurrencyPluralInfo::setCurrencyPluralPattern"); in TestCurrencyPluralInfo()
402 errln((UnicodeString)"ERROR: CurrencyPluralInfo::setLocale"); in TestCurrencyPluralInfo()
407 errln((UnicodeString)"ERROR: CurrencyPluralInfo::setPluralRules"); in TestCurrencyPluralInfo()
445 UnicodeString message; in testRounding()
446 UnicodeString resultStr; in testRounding()
450 errln((UnicodeString)"SetRoundingMode or GetRoundingMode failed for mode=" + mode); in testRounding()
457 …message= (UnicodeString)"Round() failed: round(" + (double)Roundingnumber + UnicodeString(",") + … in testRounding()
464 …message= (UnicodeString)"Round() failed: round(" + (double)Roundingnumber1 + UnicodeString(",") +… in testRounding()
471 void IntlTestDecimalFormatAPI::verify(const UnicodeString& message, const UnicodeString& got, doubl… in verify()
472 logln((UnicodeString)message + got + (UnicodeString)" Expected : " + expected); in verify()
473 UnicodeString expectedStr(""); in verify()
476 … errln((UnicodeString)"ERROR: " + message + got + (UnicodeString)" Expected : " + expectedStr); in verify()
480 …IntlTestDecimalFormatAPI::verifyString(const UnicodeString& message, const UnicodeString& got, Uni… in verifyString()
481 logln((UnicodeString)message + got + (UnicodeString)" Expected : " + expected); in verifyString()
483 … errln((UnicodeString)"ERROR: " + message + got + (UnicodeString)" Expected : " + expected); in verifyString()
490 DecimalFormat pat(UnicodeString("#,##0.00"),status); in testRoundingInc()
499 errln((UnicodeString)"ERROR: Rounding increment not zero"); in testRoundingInc()
512 errln((UnicodeString)"ERROR: Rounding increment not zero after setRoundingMode"); in testRoundingInc()
542 UnicodeString message; in TestScale()
543 UnicodeString resultStr; in TestScale()
544 UnicodeString exp; in TestScale()
545 UnicodeString percentPattern("#,##0%"); in TestScale()
554 …ssage = UnicodeString("Unexpected output for ") + testData[i].inputValue + UnicodeString(" and sca… in TestScale()