Lines Matching refs:UnicodeString
181 UnicodeString actualPattern(EXPECTED[i].actualPattern, -1, US_INV); in TestPatterns()
182 UnicodeString expectedPattern(EXPECTED[i].expectedPattern, -1, US_INV); in TestPatterns()
202 UnicodeString pattern = generator->getBestPattern(actualPattern, errorCode); in TestPatterns()
212 UnicodeString expectedLocalPattern(EXPECTED[i].expectedLocalPattern, -1, US_INV); in TestPatterns()
213 UnicodeString actualLocalPattern1; in TestPatterns()
214 UnicodeString actualLocalPattern2; in TestPatterns()
244 SimpleDateFormat *sdf = new SimpleDateFormat((UnicodeString)"zzzz", status); in TestWallyWedel()
273 const UnicodeString* id = ids->snext(status); in TestWallyWedel()
288 UnicodeString dstOffset = (UnicodeString)"" + sign + (hours < 10 ? "0" : "") + in TestWallyWedel()
300 UnicodeString fmtOffset; in TestWallyWedel()
304 UnicodeString *fmtDstOffset = 0; in TestWallyWedel()
308 fmtDstOffset = new UnicodeString(); in TestWallyWedel()
317 logln(UnicodeString() + i + " " + *id + " " + dstOffset + in TestWallyWedel()
323 errln(UnicodeString() + i + " " + *id + " " + dstOffset + in TestWallyWedel()
353 if (!(*fmtA == *fmtB)) errln((UnicodeString)"FAIL"); in TestEquals()
370 …SimpleDateFormat* fullFmt = new SimpleDateFormat((UnicodeString)"EEE MMM dd HH:mm:ss.SSS zzz yyyy … in TestTwoDigitYearDSTParse()
371 …SimpleDateFormat *fmt = new SimpleDateFormat((UnicodeString)"dd-MMM-yy h:mm:ss 'o''clock' a z", Lo… in TestTwoDigitYearDSTParse()
373 UnicodeString* s = new UnicodeString("03-Apr-04 2:20:47 o'clock AM PST", ""); in TestTwoDigitYearDSTParse()
382 UnicodeString str; in TestTwoDigitYearDSTParse()
396 errln((UnicodeString)"FAIL: Should parse to hour " + hour + " but got " + hr); in TestTwoDigitYearDSTParse()
399 errln((UnicodeString)"FAIL: " + (int32_t)status); in TestTwoDigitYearDSTParse()
412 UnicodeString&
413 DateFormatTest::escape(UnicodeString& s) in escape()
415 UnicodeString buf; in escape()
494 UnicodeString buf; in TestFieldPosition()
531 …errln(UnicodeString("Could not create SimpleDateFormat object for locale en_US. Error: " )+ Unicod… in TestFieldPosition()
591 logln((UnicodeString)" Result = " + df->format(aug13, buf.remove())); in TestFieldPosition()
598 UnicodeString field; in TestFieldPosition()
600 assertEquals((UnicodeString)"field #" + i + " " + DATEFORMAT_FIELD_NAMES[i], in TestFieldPosition()
615 UnicodeString field; in TestFieldPosition()
617 assertEquals((UnicodeString)"field #" + i + " " + DATEFORMAT_FIELD_NAMES[i], in TestFieldPosition()
678 …if (U_FAILURE(status)) errln((UnicodeString)"FAIL: UErrorCode received during test: " + (int32_t)s… in TestPartialParse994()
689 logln(UnicodeString("Pattern \"") + pat + "\" String \"" + str + "\""); in tryPat994()
695 logln((UnicodeString)"ParseException: " + (int32_t)status); in tryPat994()
696 if (expected != null) errln((UnicodeString)"FAIL: Expected " + dateToString(expected)); in tryPat994()
700 UnicodeString f; in tryPat994()
702 logln(UnicodeString(" parse(") + str + ") -> " + dateToString(date)); in tryPat994()
703 logln((UnicodeString)" format -> " + f); in tryPat994()
705 !(date == expected)) errln((UnicodeString)"FAIL: Expected null");//" + expected); in tryPat994()
706 if (!(f == str)) errln(UnicodeString("FAIL: Expected ") + str); in tryPat994()
729 UnicodeString format("yyyyMMddHHmmssSSS"); in TestRunTogetherPattern985()
730 UnicodeString now, then; in TestRunTogetherPattern985()
743 if (date2 == 0) then = UnicodeString("Parse stopped at ") + pos.getIndex(); in TestRunTogetherPattern985()
746 if (!(date2 == date1)) errln((UnicodeString)"FAIL"); in TestRunTogetherPattern985()
748 …if (U_FAILURE(status)) errln((UnicodeString)"FAIL: UErrorCode received during test: " + (int32_t)s… in TestRunTogetherPattern985()
762 UnicodeString myDate; in TestRunTogetherPattern917()
763 fmt = new SimpleDateFormat((UnicodeString)"yyyy/MM/dd", status); in TestRunTogetherPattern917()
772 fmt = new SimpleDateFormat((UnicodeString)"yyyyMMdd", status); in TestRunTogetherPattern917()
776 …if (U_FAILURE(status)) errln((UnicodeString)"FAIL: UErrorCode received during test: " + (int32_t)s… in TestRunTogetherPattern917()
782 DateFormatTest::testIt917(SimpleDateFormat* fmt, UnicodeString& str, UDate expected) in testIt917()
785 UnicodeString pattern; in testIt917()
786 logln((UnicodeString)"pattern=" + fmt->toPattern(pattern) + " string=" + str); in testIt917()
796 logln((UnicodeString)"Parsed object: " + dateToString(o.getDate())); in testIt917()
797 … if (!(o.getDate() == expected)) errln((UnicodeString)"FAIL: Expected " + dateToString(expected)); in testIt917()
798 UnicodeString formatted; ((Format*)fmt)->format(o, formatted, status); in testIt917()
799 logln((UnicodeString)"Formatted string: " + formatted); in testIt917()
800 if (!(formatted == str)) errln((UnicodeString)"FAIL: Expected " + str); in testIt917()
801 …if (U_FAILURE(status)) errln((UnicodeString)"FAIL: UErrorCode received during test: " + (int32_t)s… in testIt917()
820 UnicodeString pattern; in TestCzechMonths459()
821 logln((UnicodeString)"Pattern " + ((SimpleDateFormat*) fmt)->toPattern(pattern)); in TestCzechMonths459()
824 UnicodeString juneStr; fmt->format(june, juneStr); in TestCzechMonths459()
825 UnicodeString julyStr; fmt->format(july, julyStr); in TestCzechMonths459()
827 logln((UnicodeString)"format(June 15 1997) = " + juneStr); in TestCzechMonths459()
829 UnicodeString s; fmt->format(d, s); in TestCzechMonths459()
831 logln((UnicodeString)" -> parse -> " + s + " (month = " + month + ")"); in TestCzechMonths459()
832 if (month != UCAL_JUNE) errln((UnicodeString)"FAIL: Month should be June"); in TestCzechMonths459()
833 logln((UnicodeString)"format(July 15 1997) = " + julyStr); in TestCzechMonths459()
837 logln((UnicodeString)" -> parse -> " + s + " (month = " + month + ")"); in TestCzechMonths459()
838 if (month != UCAL_JULY) errln((UnicodeString)"FAIL: Month should be July"); in TestCzechMonths459()
842 errln((UnicodeString)"Exception: " + (int32_t)status); in TestCzechMonths459()
856 UnicodeString dateString("1995-040.05:01:29"); in TestLetterDPattern212()
857 UnicodeString bigD("yyyy-DDD.hh:mm:ss"); in TestLetterDPattern212()
858 UnicodeString littleD("yyyy-ddd.hh:mm:ss"); in TestLetterDPattern212()
862 logln((UnicodeString)"dateString= " + dateString); in TestLetterDPattern212()
871 logln((UnicodeString)"Using " + bigD + " -> " + myDate); in TestLetterDPattern212()
872 if (myDate != expBigD) errln((UnicodeString)"FAIL: bigD - Expected " + dateToString(expBigD)); in TestLetterDPattern212()
878 logln((UnicodeString)"Using " + littleD + " -> " + dateToString(myDate)); in TestLetterDPattern212()
879 …if (myDate != expLittleD) errln((UnicodeString)"FAIL: littleD - Expected " + dateToString(expLittl… in TestLetterDPattern212()
881 …if (U_FAILURE(status)) errln((UnicodeString)"FAIL: UErrorCode received during test: " + (int32_t)s… in TestLetterDPattern212()
896 logln((UnicodeString)"Test Date: " + dateToString(today)); in TestDayOfYearPattern195()
905 …if (U_FAILURE(status)) errln((UnicodeString)"FAIL: UErrorCode received during test: " + (int32_t)s… in TestDayOfYearPattern195()
915 UnicodeString thePat; in tryPattern()
916 logln((UnicodeString)"pattern: " + sdf.toPattern(thePat)); in tryPattern()
917 UnicodeString formatResult; (*(DateFormat*)&sdf).format(d, formatResult); in tryPattern()
918 logln((UnicodeString)" format -> " + formatResult); in tryPattern()
921 logln((UnicodeString)" parse(" + formatResult + ") -> " + dateToString(d2)); in tryPattern()
922 if (d2 != expected) errln((UnicodeString)"FAIL: Expected " + dateToString(expected)); in tryPattern()
923 UnicodeString format2; (*(DateFormat*)&sdf).format(d2, format2); in tryPattern()
924 logln((UnicodeString)" format -> " + format2); in tryPattern()
925 if (!(formatResult == format2)) errln((UnicodeString)"FAIL: Round trip drift"); in tryPattern()
929 errln((UnicodeString)"Error: " + (int32_t)status); in tryPattern()
942 …SimpleDateFormat* formatter = new SimpleDateFormat((UnicodeString)"MM/dd/yyyy 'at' hh:mm:ss a zzz"… in TestQuotePattern161()
949 UnicodeString dateString; ((DateFormat*)formatter)->format(currentTime_1, dateString); in TestQuotePattern161()
950 UnicodeString exp("08/13/1997 at 10:42:28 AM "); in TestQuotePattern161()
951 logln((UnicodeString)"format(" + dateToString(currentTime_1) + ") = " + dateString); in TestQuotePattern161()
952 …if (0 != dateString.compareBetween(0, exp.length(), exp, 0, exp.length())) errln((UnicodeString)"F… in TestQuotePattern161()
954 …if (U_FAILURE(status)) errln((UnicodeString)"FAIL: UErrorCode received during test: " + (int32_t)s… in TestQuotePattern161()
979 UnicodeString expected("March 1, 2000 at 1:23:45 AM "); in TestBadInput135()
991 … UnicodeString prefix = UnicodeString(text) + ", " + dateLook + "/" + timeLook + ": "; in TestBadInput135()
1000 UnicodeString format; in TestBadInput135()
1001 UnicodeString pattern; in TestBadInput135()
1009 …errln((UnicodeString)"FAIL: Parse \"" + text + "\", pattern \"" + pattern + "\", expected " + expe… in TestBadInput135()
1025 errln((UnicodeString)"FAIL: UErrorCode received during test: " + (int32_t)status); in TestBadInput135()
1097 UnicodeString thePat; in TestBadInput135a()
1098 logln(UnicodeString("Trying to parse \"") + s + "\" with " + dateParse->toPattern(thePat)); in TestBadInput135a()
1102 errln((UnicodeString)"FAIL: Expected exception during parse"); in TestBadInput135a()
1106 logln((UnicodeString)"Exception during parse: " + (int32_t)status); in TestBadInput135a()
1111 UnicodeString s( inputStrings[i]); in TestBadInput135a()
1120 UnicodeString s1, s2; in TestBadInput135a()
1124 errln((UnicodeString)"ERROR: null result fmt=\"" + in TestBadInput135a()
1130 UnicodeString result; in TestBadInput135a()
1132 …logln((UnicodeString)"Parsed \"" + s + "\" using \"" + dateParse->toPattern(thePat) + "\" to: " + … in TestBadInput135a()
1134 errln((UnicodeString)"FAIL: Expected parse failure, got " + result); in TestBadInput135a()
1136 …errln(UnicodeString("FAIL: Parse \"") + s + UnicodeString("\", expected ") + expected + UnicodeStr… in TestBadInput135a()
1140 errln(UnicodeString("FAIL: Expected ") + expected + " from \"" + in TestBadInput135a()
1146 errln((UnicodeString)"An exception was thrown during parse: " + (int32_t)status); in TestBadInput135a()
1152 errln((UnicodeString)"FAIL: UErrorCode received during test: " + (int32_t)status); in TestBadInput135a()
1181 UnicodeString thePat; in parse2DigitYear()
1182 …logln(UnicodeString("Parsing \"") + str + "\" with " + ((SimpleDateFormat*)&fmt)->toPattern(thePat… in parse2DigitYear()
1184 if (d != expected) errln((UnicodeString)"FAIL: Expected " + expected); in parse2DigitYear()
1188 errln((UnicodeString)"FAIL: Got exception"); in parse2DigitYear()
1204 logln((UnicodeString)"Date 1997/3/25 00:00 GMT: " + date); in TestDateFormatZone061()
1205 formatter = new SimpleDateFormat((UnicodeString)"dd-MMM-yyyyy HH:mm", Locale::getUK(), status); in TestDateFormatZone061()
1212 UnicodeString temp; formatter->format(date, temp); in TestDateFormatZone061()
1213 logln((UnicodeString)"Formatted in GMT to: " + temp); in TestDateFormatZone061()
1216 logln((UnicodeString)"Parsed to: " + dateToString(tempDate)); in TestDateFormatZone061()
1217 if (tempDate != date) errln((UnicodeString)"FAIL: Expected " + dateToString(date)); in TestDateFormatZone061()
1221 errln((UnicodeString)"Date Formatter throws: " + (int32_t)status); in TestDateFormatZone061()
1243 UnicodeString testtimezone; in TestDateFormatZone146()
1264 UnicodeString DATA [] = { in TestDateFormatZone146()
1265 UnicodeString("simple format: "), UnicodeString("04/04/97 23:00 GMT"), in TestDateFormatZone146()
1266 UnicodeString("MM/dd/yy HH:mm z"), in TestDateFormatZone146()
1267 … UnicodeString("full format: "), UnicodeString("Friday, April 4, 1997 11:00:00 o'clock PM GMT"), in TestDateFormatZone146()
1268 UnicodeString("EEEE, MMMM d, yyyy h:mm:ss 'o''clock' a z"), in TestDateFormatZone146()
1269 UnicodeString("long format: "), UnicodeString("April 4, 1997 11:00:00 PM GMT"), in TestDateFormatZone146()
1270 UnicodeString("MMMM d, yyyy h:mm:ss a z"), in TestDateFormatZone146()
1271 UnicodeString("default format: "), UnicodeString("04-Apr-97 11:00:00 PM"), in TestDateFormatZone146()
1272 UnicodeString("dd-MMM-yy h:mm:ss a"), in TestDateFormatZone146()
1273 UnicodeString("short format: "), UnicodeString("4/4/97 11:00 PM"), in TestDateFormatZone146()
1274 UnicodeString("M/d/yy h:mm a") in TestDateFormatZone146()
1285 UnicodeString result; in TestDateFormatZone146()
1317 …UnicodeString expectedFRENCH ( "lundi 15 septembre 1997 \\u00E0 00:00:00 heure d\\u2019\\u00E9t\\u… in TestLocaleDateFormat()
1319 UnicodeString expectedUS ( "Monday, September 15, 1997 at 12:00:00 AM Pacific Daylight Time" ); in TestLocaleDateFormat()
1320 logln((UnicodeString)"Date set to : " + dateToString(testDate)); in TestLocaleDateFormat()
1321 UnicodeString out; in TestLocaleDateFormat()
1330 logln((UnicodeString)"Date Formated with French Locale " + out); in TestLocaleDateFormat()
1332 errln((UnicodeString)"FAIL: Expected " + expectedFRENCH); in TestLocaleDateFormat()
1335 logln((UnicodeString)"Date Formated with US Locale " + out); in TestLocaleDateFormat()
1337 errln((UnicodeString)"FAIL: Expected " + expectedUS); in TestLocaleDateFormat()
1348 logln((UnicodeString)"Date set to : " + dateToString(testDate)); in TestFormattingLocaleTimeSeparator()
1366 const UnicodeString expectedArab = UnicodeString( in TestFormattingLocaleTimeSeparator()
1369 const UnicodeString expectedLatn = UnicodeString( in TestFormattingLocaleTimeSeparator()
1372 UnicodeString actualArab; in TestFormattingLocaleTimeSeparator()
1373 UnicodeString actualLatn; in TestFormattingLocaleTimeSeparator()
1388 UnicodeString str; in TestDateFormatCalendar()
1418 errln((UnicodeString)"FAIL: Calendar::createInstance failed with " + in TestDateFormatCalendar()
1425 str = UnicodeString("4/5/2001", ""); in TestDateFormatCalendar()
1429 errln((UnicodeString)"FAIL: DateFormat::parse(4/5/2001) failed at " + in TestDateFormatCalendar()
1435 str = UnicodeString("5:45 PM", ""); in TestDateFormatCalendar()
1439 errln((UnicodeString)"FAIL: DateFormat::parse(17:45) failed at " + in TestDateFormatCalendar()
1447 errln((UnicodeString)"FAIL: cal->getTime() failed with " + u_errorName(ec)); in TestDateFormatCalendar()
1553 SimpleDateFormat f(UnicodeString("Yesterday"), ec); in TestInvalidPattern()
1558 UnicodeString out; in TestInvalidPattern()
1574 UnicodeString str; in TestGreekMay()
1914 const UnicodeString FAIL_STR("parse failure"); in expectParse()
1938 UnicodeString gotstr(FAIL_STR); in expectParse()
1948 UnicodeString expstr(FAIL_STR); in expectParse()
1961 logln((UnicodeString)"Ok: " + input + " x " + in expectParse()
1964 errln((UnicodeString)"FAIL: " + input + " x " + in expectParse()
2001 UnicodeString str, str2; in expect()
2010 UnicodeString currentPat; in expect()
2026 assertEquals((UnicodeString)"\"" + currentPat + "\".format(" + datestr + ")", in expect()
2034 if (assertSuccess((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")", ec)) { in expect()
2035 assertEquals((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")", in expect()
2048 if (assertSuccess((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")", ec)) { in expect()
2049 assertEquals((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")", in expect()
2055 assertEquals((UnicodeString)"\"" + currentPat + "\".format(" + datestr + ")", in expect()
2065 assertEquals((UnicodeString)"\"" + currentPat + "\".format(" + datestr + ")", in expect()
2070 if (assertSuccess((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")", ec)) { in expect()
2071 assertEquals((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")", in expect()
2078 errln((UnicodeString)"FAIL: Invalid control string " + control); in expect()
2105 UnicodeString str, str2; in expectFormat()
2114 UnicodeString currentPat; in expectFormat()
2127 assertEquals((UnicodeString)"\"" + currentPat + "\".format(" + datestr + ")", in expectFormat()
2214 UnicodeString basepat("yy/MM/dd H:mm "); in TestGenericTime()
2227 UnicodeString test; in TestGenericTime()
2230 const UnicodeString times[] = { in TestGenericTime()
2237 logln(UnicodeString("\ntime: ") + d); in TestGenericTime()
2246 errln((UnicodeString)"FAIL: format " + k + in TestGenericTime()
2251 logln((UnicodeString)"OK: format " + k + " parsed ok"); in TestGenericTime()
2254 errln((UnicodeString)"FAIL: format " + k + in TestGenericTime()
2320 UnicodeString test; in TestZTimeZoneParsing()
2330 UnicodeString input; in TestZTimeZoneParsing()
2331 UnicodeString expected_result; in TestZTimeZoneParsing()
2339 UnicodeString result; in TestZTimeZoneParsing()
2376 UnicodeString bannerStr(banner, ""); in TestRelative()
2381 UnicodeString test; in TestRelative()
2411 UnicodeString result; in TestRelative()
2412 UnicodeString normalResult; in TestRelative()
2413 UnicodeString expect; in TestRelative()
2414 UnicodeString parseResult; in TestRelative()
2446 UnicodeString parseFormat; // parse rel->format full in TestRelative()
2449 UnicodeString origFormat; in TestRelative()
2494 UnicodeString result1; in TestRelativeClone()
2500 UnicodeString result2; in TestRelativeClone()
2524 UnicodeString result1; in TestHostClone()
2530 UnicodeString result2; in TestHostClone()
2554 UnicodeString result1; in TestHebrewClone()
2561 UnicodeString result2; in TestHebrewClone()
3393 SimpleDateFormat testfmt(UnicodeString("yyyy-MM-dd'T'HH:mm:ss'Z'"), status); in TestTimeZoneDisplayName()
3399 UnicodeString info[5]; in TestTimeZoneDisplayName()
3401 info[j] = UnicodeString(testLine[j], -1, US_INV); in TestTimeZoneDisplayName()
3411 errln(UnicodeString("Failed to set date: ") + testLine[2]); in TestTimeZoneDisplayName()
3417 UnicodeString result; in TestTimeZoneDisplayName()
3464 UnicodeString buf; in TestRoundtripWithCalendar()
3477 UnicodeString refStr(buf); in TestRoundtripWithCalendar()
3492 … errln((UnicodeString)"FAIL: Different format result with a different calendar for the same time -" in TestRoundtripWithCalendar()
3523 UnicodeString tzid; in TestRoundtripWithCalendar()
3524 …errln((UnicodeString)"FAIL: Different parse result with a different calendar for the same string -" in TestRoundtripWithCalendar()
3535 errln((UnicodeString)"FAIL: " + u_errorName(status)); in TestRoundtripWithCalendar()
3575 SimpleDateFormat *fmt1 = new SimpleDateFormat(UnicodeString("y-M-d"), Locale("ar"), status); in Test6338()
3579 UnicodeString str1; in Test6338()
3586 UnicodeString str11; in Test6338()
3591 errln((UnicodeString)"FAIL: Different dates str1:" + str1 in Test6338()
3599 SimpleDateFormat *fmt2 = new SimpleDateFormat(UnicodeString("y M d"), Locale("ar"), status); in Test6338()
3603 UnicodeString str2; in Test6338()
3610 UnicodeString str22; in Test6338()
3615 errln((UnicodeString)"FAIL: Different dates str1:" + str2 in Test6338()
3623 SimpleDateFormat *fmt3 = new SimpleDateFormat(UnicodeString("y-M-d"), Locale("en-us"), status); in Test6338()
3627 UnicodeString str3; in Test6338()
3634 UnicodeString str33; in Test6338()
3639 errln((UnicodeString)"FAIL: Different dates str1:" + str3 in Test6338()
3647 SimpleDateFormat *fmt4 = new SimpleDateFormat(UnicodeString("y M d"), Locale("en-us"), status); in Test6338()
3651 UnicodeString str4; in Test6338()
3658 UnicodeString str44; in Test6338()
3663 errln((UnicodeString)"FAIL: Different dates str1:" + str4 in Test6338()
3676 UnicodeString strf, strl, strm, strs; in Test6726()
3702 errln((UnicodeString)"FAIL: Improper formatted date: " + strm ); in Test6726()
3706 errln((UnicodeString)"FAIL: Improper formatted date: " + strs); in Test6726()
3752 UnicodeString s1, s2; in Test6880()
3806 UnicodeString datePattern;
3807 UnicodeString dateString;
3814 …{ "", FALSE, TRUE, UnicodeString("y MMMM d HH:mm:ss"), UnicodeString("2009 7 14… in TestNumberAsStringParsing()
3815 …{ "", TRUE, FALSE, UnicodeString("y MMMM d HH:mm:ss"), UnicodeString("2009 7 14… in TestNumberAsStringParsing()
3816 …{ "en", FALSE, FALSE, UnicodeString("MMM d, y"), UnicodeString("Jul 14, 2… in TestNumberAsStringParsing()
3817 …{ "en", TRUE, FALSE, UnicodeString("MMM d, y"), UnicodeString("Jul 14, 2… in TestNumberAsStringParsing()
3818 …{ "en", FALSE, TRUE, UnicodeString("MMM d, y"), UnicodeString("7 14, 200… in TestNumberAsStringParsing()
3819 …{ "en", TRUE, FALSE, UnicodeString("MMM d, y"), UnicodeString("7 14, 200… in TestNumberAsStringParsing()
3820 …{ "ja", FALSE, FALSE, UnicodeString("yyyy/MM/dd"), UnicodeString("2009/07/1… in TestNumberAsStringParsing()
3821 …{ "ja", TRUE, FALSE, UnicodeString("yyyy/MM/dd"), UnicodeString("2009/07/1… in TestNumberAsStringParsing()
3823 …{ "ja", TRUE, FALSE, UnicodeString("yyyy/MMMMM/d"), UnicodeString("2009/7/14… in TestNumberAsStringParsing()
3828 …{ "ko", FALSE, FALSE, UnicodeString("yyyy. M. d."), UnicodeString("2009. 7. … in TestNumberAsStringParsing()
3829 …{ "ko", TRUE, FALSE, UnicodeString("yyyy. M. d."), UnicodeString("2009. 7. … in TestNumberAsStringParsing()
3830 …{ "ko", FALSE, FALSE, UnicodeString("yyyy. MMMMM d."), CharsToUnicodeString("20… in TestNumberAsStringParsing()
3831 …{ "ko", TRUE, FALSE, UnicodeString("yyyy. MMMMM d."), CharsToUnicodeString("20… in TestNumberAsStringParsing()
3836 …{ NULL, FALSE, FALSE, UnicodeString(""), UnicodeString("") … in TestNumberAsStringParsing()
3853 …errln("FAIL, err when expected success: Locale \"" + UnicodeString(itemPtr->localeStr) + "\", leni… in TestNumberAsStringParsing()
3857 …errln("FAIL, expected err but got none: Locale \"" + UnicodeString(itemPtr->localeStr) + "\", leni… in TestNumberAsStringParsing()
3860 UnicodeString formatted; in TestNumberAsStringParsing()
3863 …errln("FAIL, mismatch formatting parsed date: Locale \"" + UnicodeString(itemPtr->localeStr) + "\"… in TestNumberAsStringParsing()
3887 …SimpleDateFormat *fmt1 = new SimpleDateFormat(UnicodeString("GGG yyyy-MM-dd'T'HH:mm:ss'Z"), status… in TestISOEra()
3897 UnicodeString in = data[i]; in TestISOEra()
3904 UnicodeString out; in TestISOEra()
3909 UnicodeString expected = data[i+1]; in TestISOEra()
3911 dataerrln((UnicodeString)"FAIL: " + in + " -> " + out + " expected -> " + expected); in TestISOEra()
3920 UnicodeString pattern ("y\\u5e74M\\u6708d\\u65e5", -1, US_INV ); in TestFormalChineseDate()
3922 UnicodeString override ("y=hanidec;M=hans;d=hans", -1, US_INV ); in TestFormalChineseDate()
3932 UnicodeString result; in TestFormalChineseDate()
3935 …UnicodeString expected = "\\u4e8c\\u3007\\u3007\\u4e5d\\u5e74\\u4e03\\u6708\\u4e8c\\u5341\\u516b\\… in TestFormalChineseDate()
3938 dataerrln((UnicodeString)"FAIL: -> " + result + " expected -> " + expected); in TestFormalChineseDate()
3943 UnicodeString pat1 ("yyyy-MM-dd'T'HH:mm:ss'Z'", -1, US_INV ); in TestFormalChineseDate()
3945 UnicodeString parsedres,expres; in TestFormalChineseDate()
3948 dataerrln((UnicodeString)"FAIL: parsed -> " + parsedres + " expected -> " + expres); in TestFormalChineseDate()
3962 UnicodeString inText("GMT$$$"); in TestStandAloneGMTParse()
3967 …errln((UnicodeString)"FAIL: Incorrect output parse position: actual=" + pos.getIndex() + " expecte… in TestStandAloneGMTParse()
3996 SimpleDateFormat *sdf = new SimpleDateFormat(UnicodeString(TestData[i][0]), status); in TestParsePosition()
4002 UnicodeString input(TestData[i][1]); in TestParsePosition()
4017 …errln(UnicodeString("FAIL: Parsing [") + input + "] with pattern [" + TestData[i][0] + "] returns … in TestParsePosition()
4039 UnicodeString dateString[NUM_TEST_DATES];
4053 …", DateFormat::kLong, { UnicodeString("2012(ren-chen) M04 2"), UnicodeString("2012(ren-chen) … in TestMonthPatterns()
4054 …hinese", DateFormat::kShort, { UnicodeString("2012-04-02"), UnicodeString("2012-04bis-02"), … in TestMonthPatterns()
4055 …hinese", -1, { UnicodeString("29-4-2"), UnicodeString("29-4bis-2"), … in TestMonthPatterns()
4056 …hinese", -2, { UnicodeString("78x29-4-2"), UnicodeString("78x29-4bis-2"), … in TestMonthPatterns()
4057 …hinese", -3, { UnicodeString("ren-chen-4-2"), UnicodeString("ren-chen-4bis-2")… in TestMonthPatterns()
4058 …hinese", -4, { UnicodeString("ren-chen M04 2"), UnicodeString("ren-chen M04bis… in TestMonthPatterns()
4059 …gorian", -3, { UnicodeString("2012-4-22"), UnicodeString("2012-5-22"), … in TestMonthPatterns()
4060 …", DateFormat::kLong, { UnicodeString("4 2, 2012(ren-chen)"), UnicodeString("4bis 2, 2012(re… in TestMonthPatterns()
4061 …nese", DateFormat::kShort, { UnicodeString("4/2/2012"), UnicodeString("4bis/2/2012"), … in TestMonthPatterns()
4083 …nese", DateFormat::kShort, { UnicodeString("2/4/29"), UnicodeString("2/4bis/29"), … in TestMonthPatterns()
4084 …i", DateFormat::kLong, { UnicodeString("3bis 2, 2012(29)"), UnicodeString("4 2, 2012(29)"… in TestMonthPatterns()
4085 …gi", DateFormat::kShort, { UnicodeString("3bis/2/2012"), UnicodeString("4/2/2012"), … in TestMonthPatterns()
4086 …gi", -2, { UnicodeString("78x29-3bis-2"), UnicodeString("78x29-4-2"), … in TestMonthPatterns()
4094 … NULL, 0, { UnicodeString(""), UnicodeString(""), UnicodeSt… in TestMonthPatterns()
4098 …const UnicodeString customPatterns[] = { "y-Ml-d", "G'x'y-Ml-d", "U-M-d", "U MMM d" }; // like old… in TestMonthPatterns()
4119 UnicodeString result; in TestMonthPatterns()
4123 …errln( UnicodeString("FAIL: Chinese calendar format for locale ") + UnicodeString(itemPtr->locale)… in TestMonthPatterns()
4140 …errln( UnicodeString("FAIL: Chinese calendar parse for locale ") + UnicodeString(itemPtr->locale) … in TestMonthPatterns()
4156 errln(UnicodeString("FAIL: Unable to create Calendar for root@calendar=chinese")); in TestMonthPatterns()
4162 UnicodeString pattern;
4164 UnicodeString expectedFormat;
4172 …{ "fr", UnicodeString("MMMM y"), UDISPCTX_CAPITALIZATION_NONE, UnicodeString(… in TestContext()
4174 …{ "fr", UnicodeString("MMMM y"), UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE, UnicodeString(… in TestContext()
4175 …{ "fr", UnicodeString("MMMM y"), UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, UnicodeString(… in TestContext()
4176 …{ "fr", UnicodeString("MMMM y"), UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU, UnicodeString(… in TestContext()
4177 …{ "fr", UnicodeString("MMMM y"), UDISPCTX_CAPITALIZATION_FOR_STANDALONE, UnicodeString(… in TestContext()
4179 …{ "cs", UnicodeString("LLLL y"), UDISPCTX_CAPITALIZATION_NONE, CharsToUnicode… in TestContext()
4181 …{ "cs", UnicodeString("LLLL y"), UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE, CharsToUnicode… in TestContext()
4182 …{ "cs", UnicodeString("LLLL y"), UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE, CharsToUnicode… in TestContext()
4183 …{ "cs", UnicodeString("LLLL y"), UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU, CharsToUnicode… in TestContext()
4184 …{ "cs", UnicodeString("LLLL y"), UDISPCTX_CAPITALIZATION_FOR_STANDALONE, CharsToUnicode… in TestContext()
4187 { NULL, UnicodeString(""), (UDisplayContext)0, UnicodeString("") } in TestContext()
4192 … dataerrln(UnicodeString("FAIL: Unable to create Calendar for default timezone and locale.")); in TestContext()
4201 …dataerrln(UnicodeString("FAIL: Unable to create SimpleDateFormat for specified pattern with locale… in TestContext()
4204 UnicodeString result; in TestContext()
4208 … errln(UnicodeString("FAIL: format for locale ") + UnicodeString(itemPtr->locale) + in TestContext()
4232 UnicodeString formattedDate;
4239 UnicodeString pattern; // ignored unless style == DateFormat::kNone
4252 { 0, 0, 0, 0, 0, 0, UnicodeString("") } // terminator in TestNonGregoFmtParse()
4257 { 0, 0, 0, 0, 0, 0, UnicodeString("") } // terminator in TestNonGregoFmtParse()
4262 { 0, 0, 0, 0, 0, 0, UnicodeString("") } // terminator in TestNonGregoFmtParse()
4267 { 0, 0, 0, 0, 0, 0, UnicodeString("") } // terminator in TestNonGregoFmtParse()
4272 { 0, 0, 0, 0, 0, 0, UnicodeString("") } // terminator in TestNonGregoFmtParse()
4275 { 0, 1384, 0, 1, 12, 0, UnicodeString("1 Muh. 1384 AH, 1964") }, in TestNonGregoFmtParse()
4276 { 0, 1436, 0, 1, 12, 0, UnicodeString("1 Muh. 1436 AH, 2014") }, in TestNonGregoFmtParse()
4277 { 0, 1487, 0, 1, 12, 0, UnicodeString("1 Muh. 1487 AH, 2064") }, in TestNonGregoFmtParse()
4278 { 0, 0, 0, 0, 0, 0, UnicodeString("") } // terminator in TestNonGregoFmtParse()
4282 …{ "he@calendar=hebrew", DateFormat::kLong, UnicodeString(""), cafti_he_hebrew_lo… in TestNonGregoFmtParse()
4287 …{ "en@calendar=islamic", DateFormat::kNone, UnicodeString("d MMM y G, r"), cafti_en_islamic_c… in TestNonGregoFmtParse()
4288 { NULL, DateFormat::kNone, UnicodeString(""), NULL } // terminator in TestNonGregoFmtParse()
4318 UnicodeString result; in TestNonGregoFmtParse()
4322 …errln( UnicodeString("FAIL: date format for locale ") + UnicodeString(itemPtr->locale) + ", style … in TestNonGregoFmtParse()
4335 … errln( UnicodeString("FAIL: date parse for locale ") + UnicodeString(itemPtr->locale) + in TestNonGregoFmtParse()
4338 …ppos.getIndex() + " " + year +"-"+month+"-"+day + " status " + UnicodeString(u_errorName(status)) … in TestNonGregoFmtParse()
4366 UnicodeString formattedString; in TestDotAndAtLeniency()
4374 … errln(UnicodeString(" with date-time: dateStyle=") + dateStyle + " timeStyle=" + timeStyle); in TestDotAndAtLeniency()
4377 UnicodeString ds, ts; in TestDotAndAtLeniency()
4380 …errln(UnicodeString(" with date sp sp time: dateStyle=") + dateStyle + " timeStyle=" + timeStyl… in TestDotAndAtLeniency()
4383 UnicodeString plusDot(formattedString); in TestDotAndAtLeniency()
4386 …errln(UnicodeString(" with date plus-dot time: dateStyle=") + dateStyle + " timeStyle=" + timeS… in TestDotAndAtLeniency()
4390 UnicodeString minusDot(formattedString); in TestDotAndAtLeniency()
4393 …errln(UnicodeString(" with date minus-dot time: dateStyle=") + dateStyle + " timeStyle=" + time… in TestDotAndAtLeniency()
4401 UBool DateFormatTest::showParse(DateFormat &format, const UnicodeString &formattedString) { in showParse()
4405 UnicodeString pattern; in showParse()
4419 UnicodeString parseString;
4420 UnicodeString pattern;
4421 UnicodeString expectedResult; // empty string indicates expected error
4430 …{ "en", true, UnicodeString("2008-07 02"), UnicodeString("yyyy-LLLL dd"), Unicod… in TestDateFormatLeniency()
4431 …{ "en", false, UnicodeString("2008-07 02"), UnicodeString("yyyy-LLLL dd"), Unicod… in TestDateFormatLeniency()
4432 …{ "en", true, UnicodeString("2008-Jan 02"), UnicodeString("yyyy-LLL. dd"), Unicod… in TestDateFormatLeniency()
4433 …{ "en", false, UnicodeString("2008-Jan 02"), UnicodeString("yyyy-LLL. dd"), Unicod… in TestDateFormatLeniency()
4434 …{ "en", true, UnicodeString("2008-Jan--02"), UnicodeString("yyyy-MMM' -- 'dd"), Unicod… in TestDateFormatLeniency()
4435 …{ "en", false, UnicodeString("2008-Jan--02"), UnicodeString("yyyy-MMM' -- 'dd"), Unicod… in TestDateFormatLeniency()
4437 …{ NULL, true, UnicodeString(""), UnicodeString(""), Unicod… in TestDateFormatLeniency()
4442 … dataerrln(UnicodeString("FAIL: Unable to create Calendar for default timezone and locale.")); in TestDateFormatLeniency()
4483 UnicodeString formatResult(""); in TestDateFormatLeniency()
4498 UnicodeString parseString;
4499 UnicodeString pattern;
4500 UnicodeString expectedResult; // empty string indicates expected error
4507 …{true, UnicodeString("2013-Sep 13"), UnicodeString("yyyy-MMM dd"), Un… in TestParseMultiPatternMatch()
4508 …{true, UnicodeString("2013-September 14"), UnicodeString("yyyy-MMM dd"), Un… in TestParseMultiPatternMatch()
4509 …{false, UnicodeString("2013-September 15"), UnicodeString("yyyy-MMM dd"), Un… in TestParseMultiPatternMatch()
4510 …{false, UnicodeString("2013-September 16"), UnicodeString("yyyy-MMMM dd"), Un… in TestParseMultiPatternMatch()
4511 …{true, UnicodeString("2013-Sep 17"), UnicodeString("yyyy-LLL dd"), Un… in TestParseMultiPatternMatch()
4512 …{true, UnicodeString("2013-September 18"), UnicodeString("yyyy-LLL dd"), Un… in TestParseMultiPatternMatch()
4513 …{false, UnicodeString("2013-September 19"), UnicodeString("yyyy-LLL dd"), Un… in TestParseMultiPatternMatch()
4514 …{false, UnicodeString("2013-September 20"), UnicodeString("yyyy-LLLL dd"), Un… in TestParseMultiPatternMatch()
4515 …{true, UnicodeString("2013 Sat Sep 21"), UnicodeString("yyyy EEE MMM dd"), Un… in TestParseMultiPatternMatch()
4516 …{true, UnicodeString("2013 Sunday Sep 22"), UnicodeString("yyyy EEE MMM dd"), Un… in TestParseMultiPatternMatch()
4517 …{false, UnicodeString("2013 Monday Sep 23"), UnicodeString("yyyy EEE MMM dd"), Un… in TestParseMultiPatternMatch()
4518 …{false, UnicodeString("2013 Tuesday Sep 24"), UnicodeString("yyyy EEEE MMM dd"), Un… in TestParseMultiPatternMatch()
4519 …{true, UnicodeString("2013 Wed Sep 25"), UnicodeString("yyyy eee MMM dd"), Un… in TestParseMultiPatternMatch()
4520 …{true, UnicodeString("2013 Thu Sep 26"), UnicodeString("yyyy eee MMM dd"), Un… in TestParseMultiPatternMatch()
4521 …{false, UnicodeString("2013 Friday Sep 27"), UnicodeString("yyyy eee MMM dd"), Un… in TestParseMultiPatternMatch()
4522 …{false, UnicodeString("2013 Saturday Sep 28"), UnicodeString("yyyy eeee MMM dd"), Un… in TestParseMultiPatternMatch()
4523 …{true, UnicodeString("2013 Sun Sep 29"), UnicodeString("yyyy ccc MMM dd"), Un… in TestParseMultiPatternMatch()
4524 …{true, UnicodeString("2013 Monday Sep 30"), UnicodeString("yyyy ccc MMM dd"), Un… in TestParseMultiPatternMatch()
4525 …{false, UnicodeString("2013 Sunday Oct 13"), UnicodeString("yyyy ccc MMM dd"), Un… in TestParseMultiPatternMatch()
4526 …{false, UnicodeString("2013 Monday Oct 14"), UnicodeString("yyyy cccc MMM dd"), Un… in TestParseMultiPatternMatch()
4527 …{true, UnicodeString("2013 Oct 15 Q4"), UnicodeString("yyyy MMM dd QQQ"), Un… in TestParseMultiPatternMatch()
4528 …{true, UnicodeString("2013 Oct 16 4th quarter"), UnicodeString("yyyy MMM dd QQQ"), Un… in TestParseMultiPatternMatch()
4529 …{false, UnicodeString("2013 Oct 17 4th quarter"), UnicodeString("yyyy MMM dd QQQ"), Un… in TestParseMultiPatternMatch()
4530 …{false, UnicodeString("2013 Oct 18 Q4"), UnicodeString("yyyy MMM dd QQQ"), Un… in TestParseMultiPatternMatch()
4531 …{true, UnicodeString("2013 Oct 19 Q4"), UnicodeString("yyyy MMM dd qqqq"), Un… in TestParseMultiPatternMatch()
4532 …{true, UnicodeString("2013 Oct 20 4th quarter"), UnicodeString("yyyy MMM dd qqqq"), Un… in TestParseMultiPatternMatch()
4533 …{false, UnicodeString("2013 Oct 21 Q4"), UnicodeString("yyyy MMM dd qqqq"), Un… in TestParseMultiPatternMatch()
4534 …{false, UnicodeString("2013 Oct 22 4th quarter"), UnicodeString("yyyy MMM dd qqqq"), Un… in TestParseMultiPatternMatch()
4535 …{false, UnicodeString("--end--"), UnicodeString(""), Un… in TestParseMultiPatternMatch()
4541 … dataerrln(UnicodeString("FAIL: Unable to create Calendar for default timezone and locale.")); in TestParseMultiPatternMatch()
4547 dataerrln(UnicodeString("FAIL: Unable to create DateFormat")); in TestParseMultiPatternMatch()
4576 UnicodeString formatResult(""); in TestParseMultiPatternMatch()
4641 UnicodeString fields = (UnicodeString) "M"; in TestNumberFormatOverride()
4644 fmt.adoptInsteadAndCheckErrorCode(new SimpleDateFormat((UnicodeString)"MM d", status), status); in TestNumberFormatOverride()
4678 … fmt.adoptInsteadAndCheckErrorCode(new SimpleDateFormat((UnicodeString)"MM d", status), status); in TestNumberFormatOverride()
4683 if (fields == (UnicodeString) "") { // use the one w/o fields in TestNumberFormatOverride()
4685 …} else if (fields == (UnicodeString) "mixed") { // set 1 field at first but then full override, bo… in TestNumberFormatOverride()
4689 fields = (UnicodeString) "M"; in TestNumberFormatOverride()
4694 } else if (fields == (UnicodeString) "Mo"){ // o is invlid field in TestNumberFormatOverride()
4705 UnicodeString result; in TestNumberFormatOverride()
4709 UnicodeString expected = ((UnicodeString)DATA[i][1]).unescape();; in TestNumberFormatOverride()
4723 UnicodeString result; in TestCreateInstanceForSkeleton()
4747 UnicodeString result; in TestCreateInstanceForSkeletonDefault()
4764 UnicodeString result; in TestCreateInstanceForSkeletonWithCalendar()
4793 const UnicodeString *months = sym->getShortMonths(count); in TestDFSCreateForLocaleNonGregorianLocale()
4796 UnicodeString expected("\\u0698\\u0627\\u0646\\u0648\\u06CC\\u0647\\u0654"); // Android-changed in TestDFSCreateForLocaleNonGregorianLocale()
4812 const UnicodeString *months = sym->getShortMonths(count); in TestDFSCreateForLocaleWithCalendarInLocale()
4815 UnicodeString expected("Tishri"); in TestDFSCreateForLocaleWithCalendarInLocale()
4832 UnicodeString result; in TestChangeCalendar()