Lines Matching defs:UnicodeString
21 dataerrln((UnicodeString(u_errorName(status)) + UnicodeString(" : " ) )+ msg); \
26 static UnicodeString escape( const UnicodeString&src)
28 UnicodeString dst;
35 dst += UnicodeString("[");
38 dst += UnicodeString(buf);
39 dst += UnicodeString("]");
64 #define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break
129 logln(UnicodeString("Creating calendar of locale ") + locs[j]);
132 CHECK(status, "creating '" + UnicodeString(locs[j]) + "' calendar");
134 logln(UnicodeString(" type is ") + c->getType());
136 dataerrln(UnicodeString(locs[j]) + UnicodeString("Calendar type ") + c->getType() + " instead of " + types[j]);
167 errln((UnicodeString)"cal's tz " + tz1 + " != grego's tz " + tz2);
186 logln((UnicodeString)"cal : " + CalendarTest::calToStr(cal));
187 logln((UnicodeString)"grego: " + CalendarTest::calToStr(*grego));
190 logln(UnicodeString("OK: ") + era + ":" + year + "/" + (month+1) + "/" + dayOfMonth +
191 " => " + d + " (" + UnicodeString(cal.getType()) + ")");
193 errln(UnicodeString("Fail: (fields to millis)") + era + ":" + year + "/" + (month+1) + "/" + dayOfMonth +
194 " => " + d + ", expected " + D + " (" + UnicodeString(cal.getType()) + "Off by: " + (d-D));
203 logln((UnicodeString)"cal : " + CalendarTest::calToStr(cal));
204 logln((UnicodeString)"grego: " + CalendarTest::calToStr(*grego));
207 logln((UnicodeString)"OK: " + D + " => " + cal.get(UCAL_ERA, status) + ":" +
209 (cal.get(UCAL_MONTH, status)+1) + "/" + cal.get(UCAL_DATE, status) + " (" + UnicodeString(cal.getType()) + ")");
211 errln((UnicodeString)"Fail: (millis to fields)" + D + " => " + cal.get(UCAL_ERA, status) + ":" +
215 dayOfMonth + " (" + UnicodeString(cal.getType()));
238 CHECK(status, UnicodeString("Creating de_CH calendar"));
244 errln((UnicodeString)"Error: Calendar time " + timeCal +
290 CHECK(status, UnicodeString("Creating th_TH@calendar=buddhist calendar"));
297 errln((UnicodeString)"Error: Calendar time " + timeCal +
341 CHECK(status, UnicodeString("Creating en_US@calendar=roc calendar"));
348 errln((UnicodeString)"Error: Calendar time " + timeCal +
395 CHECK(status, UnicodeString("Creating ja_JP@calendar=japanese calendar"));
401 errln((UnicodeString)"Error: Calendar time " + timeCal +
418 SimpleDateFormat *fmt = new SimpleDateFormat(UnicodeString("MMMM d, yyyy G"), Locale("en_US@calendar=buddhist"), status);
420 SimpleDateFormat *fmt2 = new SimpleDateFormat(UnicodeString("MMMM d, yyyy G"), Locale("en_US@calendar=gregorian"), status);
425 UnicodeString str;
427 logln(UnicodeString() + "Test Date: " + str);
430 logln(UnicodeString() + "as Buddhist Calendar: " + escape(str));
431 UnicodeString expected("September 8, 2544 BE");
437 UnicodeString str3;
452 UnicodeString expect = CharsToUnicodeString("\\u0E27\\u0E31\\u0E19\\u0E40\\u0E2A\\u0E32\\u0E23\\u0E4C\\u0E17\\u0E35\\u0E48"
461 UnicodeString expect = CharsToUnicodeString("\\u0E27\\u0E31\\u0E19\\u0E40\\u0E2A\\u0E32\\u0E23\\u0E4C\\u0E17\\u0E35\\u0E48"
470 UnicodeString expect = CharsToUnicodeString("\\u0E27\\u0E31\\u0E19\\u0E40\\u0E2A\\u0E32\\u0E23\\u0E4C\\u0E17\\u0E35\\u0E48"
479 UnicodeString expect = CharsToUnicodeString("\\u0E27\\u0E31\\u0E19\\u0E40\\u0E2A\\u0E32\\u0E23\\u0E4C\\u0E17\\u0E35\\u0E48"
495 CHECK(status, UnicodeString("Creating ja_JP_TRADITIONAL calendar"));
504 SimpleDateFormat *fmt = new SimpleDateFormat(UnicodeString("MMMM d, yy G"), Locale("en_US@calendar=japanese"), status);
505 SimpleDateFormat *fmt2 = new SimpleDateFormat(UnicodeString("MMMM d, yyyy G"), Locale("en_US@calendar=gregorian"), status);
510 UnicodeString str;
512 logln(UnicodeString() + "Test Date: " + str);
515 logln(UnicodeString() + "as Japanese Calendar: " + str);
516 UnicodeString expected("September 8, 13 Heisei");
522 UnicodeString str3;
535 fmt = new SimpleDateFormat(UnicodeString("G y"), Locale("en_US@calendar=japanese"), status);
541 UnicodeString str;
543 logln(UnicodeString() + "Test Date: " + str);
546 logln(UnicodeString() + "as Japanese Calendar: " + str);
547 UnicodeString expected("Meiji 1");
553 UnicodeString str3;
571 UnicodeString expect = CharsToUnicodeString("\\u5e73\\u621013\\u5e749\\u67088\\u65e5\\u571f\\u66dc\\u65e5");
579 UnicodeString expect = CharsToUnicodeString("\\u5e73\\u621013\\u5e749\\u67088\\u65e5\\u571f\\u66dc\\u65e5");
587 UnicodeString expect = CharsToUnicodeString("\\u5b89\\u6c385\\u5e747\\u67084\\u65e5\\u6728\\u66dc\\u65e5");
596 UnicodeString expect = CharsToUnicodeString("\\u662d\\u548c64\\u5e741\\u67086\\u65e5\\u91d1\\u66dc\\u65e5");
605 UnicodeString expect = CharsToUnicodeString("\\u5EB7\\u6B632\\u5e742\\u670829\\u65e5\\u65e5\\u66dc\\u65e5");
620 CHECK(status, UnicodeString("Creating ja_JP@calendar=japanese calendar"));
622 SimpleDateFormat *fmt2 = new SimpleDateFormat(UnicodeString("HH:mm:ss.S MMMM d, yyyy G"), Locale("en_US@calendar=gregorian"), status);
623 UnicodeString str;
633 SimpleDateFormat *fmt = new SimpleDateFormat(UnicodeString("y.M.d"), Locale("ja_JP@calendar=japanese"), status);
640 UnicodeString samplestr("1.1.9");
641 logln(UnicodeString() + "Test Year: " + samplestr);
649 logln(UnicodeString() + "as Gregorian Calendar: " + str);
657 errln(UnicodeString("parse "+samplestr+" of 'y.m.d' as Japanese Calendar, expected year ") + expectYear +
658 UnicodeString(" and era ") + expectEra +", but got year " + gotYear + " and era " + gotEra + " (Gregorian:" + str +")");
660 logln(UnicodeString() + " year: " + gotYear + ", era: " + gotEra);
673 SimpleDateFormat *fmt = new SimpleDateFormat(UnicodeString("y"), Locale("ja_JP@calendar=japanese"), status);
680 UnicodeString samplestr("1");
681 logln(UnicodeString() + "Test Year: " + samplestr);
689 logln(UnicodeString() + "as Gregorian Calendar: " + str);
697 errln(UnicodeString("parse "+samplestr+" of 'y' as Japanese Calendar, expected year ") + expectYear +
698 UnicodeString(" and era ") + expectEra +", but got year " + gotYear + " and era " + gotEra + " (Gregorian:" + str +")");
700 logln(UnicodeString() + " year: " + gotYear + ", era: " + gotEra);
723 CHECK(status, UnicodeString("Creating fa_IR@calendar=persian calendar"));
729 errln((UnicodeString)"Error: Calendar time " + timeCal +
739 SimpleDateFormat *fmt = new SimpleDateFormat(UnicodeString("MMMM d, yyyy G"), Locale(" en_US@calendar=persian"), status);
741 SimpleDateFormat *fmt2 = new SimpleDateFormat(UnicodeString("MMMM d, yyyy G"), Locale("en_US@calendar=gregorian"), status);
743 UnicodeString gregorianDate("January 18, 2007 AD");
748 UnicodeString str;
750 logln(UnicodeString() + "as Persian Calendar: " + escape(str));
751 UnicodeString expected("Dey 28, 1385 AP");
757 UnicodeString str3;
785 void IntlCalendarTest::simpleTest(const Locale& loc, const UnicodeString& expect, UDate expectDate, UErrorCode& status)
787 UnicodeString tmp;
791 logln("Try format/parse of " + (UnicodeString)loc.getName());
797 errln(UnicodeString("Failed to format " ) + loc.getName() + " expected " + escape(expect) + " got " + escape(tmp) );
801 CHECK(status, "Error occured parsing " + UnicodeString(loc.getName()));
804 errln(UnicodeString("Failed to parse " ) + escape(expect) + ", " + loc.getName() + " expect " + (double)expectDate + " got " + (double)d + " " + escape(tmp));
809 errln((UnicodeString)"Can't create " + loc.getName() + " date instance");