Home | History | Annotate | Download | only in intltest

Lines Matching refs:format

153          * Format the output.
157 sdf->format(today,fmtOffset, pos);
245 logln(*s + " P> " + ((DateFormat*)fullFmt)->format(d, str));
408 logln((UnicodeString)" Result = " + df->format(aug13, buf.remove()));
413 df->format(aug13, buf, pos);
430 * General parse/format tests. Add test cases as needed.
436 // Milliseconds are left-justified, since they format as fractions of a second
475 DateFormatTest::tryPat994(SimpleDateFormat* format, const char* pat, const char* str, UDate expected)
481 format->applyPattern(pat);
482 UDate date = format->parse(str, status);
491 ((DateFormat*)format)->format(date, f);
493 logln((UnicodeString)" format -> " + f);
519 UnicodeString format("yyyyMMddHHmmssSSS");
522 SimpleDateFormat *formatter = new SimpleDateFormat(format, status);
525 ((DateFormat*)formatter)->format(date1, now);
530 else ((DateFormat*)formatter)->format(date2, then);
571 ((Format*)fmt)->parseObject(str, o, status);
580 UnicodeString formatted; ((Format*)fmt)->format(o, formatted, status);
606 UnicodeString juneStr; fmt->format(june, juneStr);
607 UnicodeString julyStr; fmt->format(july, julyStr);
609 logln((UnicodeString)"format(June 15 1997) = " + juneStr);
611 UnicodeString s; fmt->format(d, s);
615 logln((UnicodeString)"format(July 15 1997) = " + julyStr);
617 fmt->format(d, s);
695 UnicodeString formatResult; (*(DateFormat*)&sdf).format(d, formatResult);
696 logln((UnicodeString)" format -> " + formatResult);
701 UnicodeString format2; (*(DateFormat*)&sdf).format(d2, format2);
702 logln((UnicodeString)" format -> " + format2);
723 UnicodeString dateString; ((DateFormat*)formatter)->format(currentTime_1, dateString);
725 logln((UnicodeString)"format(" + dateToString(currentTime_1) + ") = " + dateString);
774 UnicodeString format;
775 full->format(when, format);
776 logln(prefix + "OK: " + format);
777 if (0!=format.compareBetween(0, expected.length(), expected, 0, expected.length()))
778 errln((UnicodeString)"FAIL: Expected " + expected + " got " + format);
882 ((DateFormat*)dateParse)->format(date, result);
963 UnicodeString temp; formatter->format(date, temp);
1012 // format every way
1014 UnicodeString("simple format: "), UnicodeString("04/04/97 23:00 GMT+00:00"),
1016 UnicodeString("full format: "), UnicodeString("Friday, April 4, 1997 11:00:00 o'clock PM GMT+00:00"),
1018 UnicodeString("long format: "), UnicodeString("April 4, 1997 11:00:00 PM GMT+00:00"),
1020 UnicodeString("default format: "), UnicodeString("04-Apr-97 11:00:00 PM"),
1022 UnicodeString("short format: "), UnicodeString("4/4/97 11:00 PM"),
1032 result = fmt->format(greenwichdate, result);
1075 dfFrench->format(testDate, out);
1080 dfUS->format(testDate, out);
1113 /* Create a full format for output */
1157 full->format(when, str);
1238 f.format((UDate)0, out, pos);
1240 // The bug is that the call to format() will crash. By not
1250 fmt.format(date, str);
1571 gotfmt.format(got, gotstr);
1581 // This only happens if expected is in wrong format --
1614 * 'f': Format date [i+2] (as parsed using pattern [0]) and expect string [i+3].
1618 * 'F': Format date [i+2] and expect string [i+3],
1623 * 'f': Format date [i+3] and expect string [i+4].
1651 assertEquals((UnicodeString)"\"" + currentPat + "\".format(" + datestr + ")",
1653 fmt.format(date, str.remove()));
1661 univ.format(date, str.remove()),
1662 univ.format(parsedate, str2.remove()));
1675 univ.format(date, str.remove()),
1676 univ.format(parsedate, str2.remove()));
1680 assertEquals((UnicodeString)"\"" + currentPat + "\".format(" + datestr + ")",
1682 fmt.format(date, str.remove()));
1690 assertEquals((UnicodeString)"\"" + currentPat + "\".format(" + datestr + ")",
1692 fmt.format(date, str.remove()));
1697 univ.format(date, str.remove()),
1698 univ.format(parsedate, str2.remove()));
1722 * Format date [i+1] and expect string [i+2].
1749 assertEquals((UnicodeString)"\"" + currentPat + "\".format(" + datestr + ")",
1751 fmt.format(date, str.remove()));
1802 logln("cross format/parse tests");
1826 formats[j].format(d, test);
1832 errln((UnicodeString)"FAIL: format " + k +
1833 " incorrectly parsed output of format " + j +
1837 logln((UnicodeString)"OK: format " + k + " parsed ok");
1840 errln((UnicodeString)"FAIL: format " + k +
1841 " could not parse output of format " + j +
1913 univ.format(d, result);
1992 full->format(*c, expect, pos); // expected = normal full
1995 fullrelative ->format(*c, result, pos);
1996 en_full ->format(*c, normalResult, pos);
1999 errln("FAIL: Relative Format ["+bannerStr+"] of "+normalResult+" failed, expected "+expect+" but got " + result);
2001 logln("PASS: Relative Format ["+bannerStr+"] of "+normalResult+" got " + result);
2009 UnicodeString parseFormat; // parse rel->format full
2010 en_full->format(d, parseFormat, status);
2013 en_full->format(*c, origFormat, pos);
2058 full->format(now, result1, status);
2059 Format *fullClone = full->clone();
2064 fullClone->format(now, result2, status);
2088 full->format(now, result1, status);
2089 Format *fullClone = full->clone();
2094 fullClone->format(now, result2, status);
2904 fmt.format(*cal,result,pos);
2961 formatters[i]->format(*calendars[i], buf, fpos);
2975 formatters[i]->format(*calendars[j], buf, fpos);
2977 errln((UnicodeString)"FAIL: Different format result with a different calendar for the same time -"
3065 str1 = fmt1->format(dt1, str1);
3072 str11 = fmt1->format(dt11, str11);
3089 str2 = fmt2->format(dt2, str2);
3096 str22 = fmt2->format(dt22, str22);
3113 str3 = fmt3->format(dt3, str3);
3120 str33 = fmt3->format(dt33, str33);
3137 str4 = fmt4->format(dt4, str4);
3144 str44 = fmt4->format(dt44, str44);
3179 strf = fmtf->format(dt, strf);
3180 strl = fmtl->format(dt, strl);
3181 strm = fmtm->format(dt, strm);
3182 strs = fmts->format(dt, strs);
3229 // Test case for localized GMT format parsing
3230 // with no delimitters in offset format (Chinese locale)
3263 fmt->format(d1, s1);
3264 fmt->format(d2, s2);