Lines Matching refs:MessageFormat
185 MessageFormat *fmt = new MessageFormat(pattern, status);
187 dataerrln("MessageFormat pattern creation failed. - %s", u_errorName(status));
192 errln("MessageFormat::toPattern() failed.");
300 MessageFormat *form = 0;
303 form = new MessageFormat(testCases[i], Locale::getUS(), success);
305 dataerrln("MessageFormat creation failed.#1 - %s", u_errorName(success));
306 logln(((UnicodeString)"MessageFormat for ") + testCases[i] + " creation failed.\n");
329 dataerrln("MessageFormat failed test #3 - %s", u_errorName(success));
352 errln("MessageFormat failed test #5");
353 logln(UnicodeString("MessageFormat failed test #5 with error code ")+(int32_t)success);
366 errln("MessageFormat failed test #6");
374 MessageFormat *form = 0;
377 form = new MessageFormat("There are {0} files on {1}", success);
404 result = MessageFormat::format(
440 result = MessageFormat::format(
472 MessageFormat* form = new MessageFormat(
506 MessageFormat* form = new MessageFormat("The disk \"{1}\" contains {0}.", err);
552 MessageFormat* mfNum = new MessageFormat(t1, Locale("fr"), err);
563 MessageFormat* mfAlpha = new MessageFormat(t2, Locale("fr"), err);
586 MessageFormat* mfNum2 = new MessageFormat(t3, Locale("uk"), err);
590 MessageFormat* mfAlpha2 = new MessageFormat(t4, Locale("uk"), err);
614 MessageFormat* msgFmt = new MessageFormat(t5, Locale("fr"), err);
636 MessageFormat msgFmt(UNICODE_STRING_SIMPLE(
641 errln("MessageFormat constructor failed - %s\n", u_errorName(errorCode));
648 "MessageFormat with apostrophes in plural/select arguments failed:\n");
651 void TestMessageFormat::internalFormat(MessageFormat* msgFmt ,
672 MessageFormat* TestMessageFormat::internalCreate(
675 //Create the MessageFormat with simple SelectFormat
676 MessageFormat* msgFmt = new MessageFormat(pattern, locale, status);
694 //Create the MessageFormat with simple French pattern
695 MessageFormat* msgFmt1 = internalCreate(t1.unescape(), Locale("fr"),err,(char*)"From TestMessageFormat::TestSelectFormat create t1");
716 //Create the MessageFormat with Quoted French pattern
717 MessageFormat* msgFmt2 = internalCreate(t2.unescape(), Locale("fr"),err,(char*)"From TestMessageFormat::TestSelectFormat create t2");
738 //Create the MessageFormat with English pattern
739 MessageFormat* msgFmt3 = internalCreate(t3, Locale("en"),err,(char*)"From TestMessageFormat::TestSelectFormat create t3");
761 //Create the MessageFormat with Select Format with embedded number format (nested pattern)
762 MessageFormat* msgFmt4 = internalCreate(t4.unescape(), Locale("fr"),err,(char*)"From TestMessageFormat::TestSelectFormat create t4");
783 //Create the MessageFormat with Plural format with embedded select format(nested pattern)
784 MessageFormat* msgFmt5 = internalCreate(t5.unescape(), Locale("fr"),err,(char*)"From TestMessageFormat::TestSelectFormat create t5");
785 // with no data the above should fail but it seems to construct an invalid MessageFormat with no reported error. See #13079
808 //Create the MessageFormat with Select, plural, and number formats heavily nested
809 MessageFormat* msgFmt6 = internalCreate(t6, Locale("de"),err,(char*)"From TestMessageFormat::TestSelectFormat create t6");
861 MessageFormat *x = new MessageFormat("There are {0} files on {1}", success);
862 MessageFormat *z = new MessageFormat("There are {0} files on {1} created", success);
863 MessageFormat *y = 0;
864 y = new MessageFormat(*x);
891 MessageFormat *x = new MessageFormat("There are {0} files on {1}", success);
892 MessageFormat *z = new MessageFormat("There are {0} files on {1} created", success);
893 MessageFormat *y = new MessageFormat("There are {0} files on {1} created", success);
920 MessageFormat *x = new MessageFormat("There are {0} files on {1}", success);
921 MessageFormat *z = new MessageFormat("There are {0} files on {1} created", success);
922 MessageFormat *y = 0;
923 y = (MessageFormat*)x->clone();
949 MessageFormat x("There are {0} files on {1}", success);
950 MessageFormat y("There are {0} files on {1}", success);
961 MessageFormat x("There are {0} files on {1}", success);
962 MessageFormat y(x);
1005 MessageFormat msg( formatStr, err);
1080 MessageFormat msg( formatStr, err);
1123 MessageFormat msg( msgFormatString, err);
1201 MessageFormat msg( formatStr, err);
1202 MessageFormat msgCmp( formatStr, err);
1204 dataerrln("Unable to instantiate MessageFormat - %s", u_errorName(err));
1417 MessageFormat* fmt1 = new MessageFormat( formatStr, status );
1418 MessageFormat* fmt2 = NULL;
1419 MessageFormat* fmt3 = NULL;
1420 MessageFormat* fmt4 = NULL;
1427 fmt2 = new MessageFormat( *fmt1 );
1435 fmt3 = (MessageFormat*) fmt1->clone();
1436 fmt4 = (MessageFormat*) fmt2->clone();
1464 * Verify that MessageFormat accomodates more than 10 arguments and
1476 MessageFormat msg(pattern, ec);
1550 MessageFormat* fmt = new MessageFormat(formats[i], locale, ec);
1638 MessageFormat compMsg("", Locale::getUS(), ec);
1644 MessageFormat icuMsg("", Locale::getUS(), ec);
1653 assertEquals("incompatible ICU MessageFormat compatibility-apostrophe behavior",
1656 assertEquals("unexpected ICU MessageFormat double-apostrophe-optional behavior",
1670 assertEquals("incompatible ICU MessageFormat compatibility-apostrophe behavior",
1673 assertEquals("unexpected ICU MessageFormat double-apostrophe-optional behavior",
1714 UnicodeString result = MessageFormat::autoQuoteApostrophe(patterns[i], status);
1733 MessageFormat *msgfmt = new MessageFormat(testformat, Locale("fr"), status);
1735 dataerrln("FAIL: Unable to create MessageFormat.: %s", u_errorName(status));
1777 msgfmt = new MessageFormat("'", status);
1779 errln("FAIL: Unable to create MessageFormat.");
1787 // on a MessageFormat without named arguments.
1804 MessageFormat msgfmt("Hello, {alice,number} {oops,date,full} {zip,spellout} World.", Locale::getRoot(), errorCode);
1805 if(errorCode.errDataIfFailureAndReset("MessageFormat() failed")) {
1850 MessageFormat m("a { 0 , number , '#,#'#.0 } z", Locale::getEnglish(), errorCode);
1851 if (errorCode.errDataIfFailureAndReset("Unable to instantiate MessageFormat")) {
1872 MessageFormat m(
1876 if (errorCode.errDataIfFailureAndReset("Unable to instantiate MessageFormat")) {
1903 MessageFormat m(
1918 MessageFormat m0(
1932 MessageFormat m1(
1951 MessageFormat m2(
1974 MessageFormat mf1("{0,select,a{A}ab{AB}abc{ABC}other{?}}", Locale::getEnglish(), errorCode);
1986 MessageFormat mf2("{a} {aa} {aaa}", Locale::getEnglish(), errorCode);
1994 MessageFormat mf3("{aa} {aaa}", Locale::getEnglish(), errorCode);
2021 MessageFormat msgf(cas.messagePattern, cas.localeName, status);