Lines Matching refs:format
22 #include "unicode/format.h"
130 errln("Err: Number Format ");
131 logln("Number format creation failed.");
137 form->format(myNumber, buffer, pos);
143 errln("Err: Number Format parse");
144 logln("Number format parse failed.");
159 cf->format((int32_t)1, toAppendTo, status);
171 // {sfb} use double format in pattern, so result will match (not strictly necessary)
216 defDateFormat->format(obj.getDate(), buffer);
313 form->format(testArgs, count, result, fieldpos, success);
365 errln("Err: Message format creation failed");
366 logln("Sample message format creation failed.");
373 assertEquals("format",
375 form->format(testArgs1, 2, buffer2, fieldpos, success));
376 assertSuccess("format", success);
390 result = MessageFormat::format(
426 result = MessageFormat::format(
463 form->format(testArgs1, 2, string, ignore, err);
470 form->format(testArgs2, 2, string, ignore, err);
478 form->format(testArgs3, 2, string, ignore, err);
497 //is the format adopted?
502 form->format(testArgs1, 2, string, ignore, err);
510 form->format(testArgs2, 2, string, ignore, err);
518 form->format(testArgs3, 2, string, ignore, err);
547 mfNum->format(&testArgs1, 1, numResult1, ignore, err);
552 mfAlpha->format(argName, &testArgs1, 1, argNameResult, err);
575 mfNum2->format(&testArgs2, 1, numResult1, ignore, err);
578 mfAlpha2->format(argName, &testArgs2, 1, argNameResult, err);
609 msgFmt->format(&testArgs3, 1, argNameResult, ignore, err);
628 //Format with passed arguments
629 msgFmt->format( args , numOfArgs , result, ignore, status);
675 //Format
677 internalFormat( msgFmt1 , testArgs[i], 2, exp[i].unescape() ,(char*)"From TestMessageFormat::testSelectFormat format t1");
697 //Format
699 internalFormat( msgFmt2 , testArgs[i], 2, exp[i].unescape() ,(char*)"From TestMessageFormat::testSelectFormat format t2");
719 //Format
721 internalFormat( msgFmt3 , testArgs[i], 1, exp[i] ,(char*)"From TestMessageFormat::testSelectFormat format t3");
726 //Nested patterns with plural, number ,choice ,select format etc.
727 //Select Format with embedded number format
729 //Create the MessageFormat with Select Format with embedded number format (nested pattern)
741 //Format
743 internalFormat( msgFmt4 , testArgs[i], 3, exp[i].unescape() ,(char*)"From TestMessageFormat::testSelectFormat format t4");
749 //Plural format with embedded select format
752 //Create the MessageFormat with Plural format with embedded select format(nested pattern)
766 //Format
768 internalFormat( msgFmt5 , testArgs[i], 3, exp[i].unescape() ,(char*)"From TestMessageFormat::testSelectFormat format t5");
814 Format
816 internalFormat( msgFmt6 , testArgs[i], 4, exp[i] ,(char*)"From TestMessageFormat::testSelectFormat format t6");
977 result = msg.format(
986 dataerrln("*** MSG format err. - %s", u_errorName(err));
1007 result = msg.format(
1052 result = msg.format(
1060 dataerrln("*** MSG format without expected error code. - %s", u_errorName(err));
1066 result = msg.format(
1073 logln("MSG format( Formattable&, ... ) expected:" + compareStr);
1074 logln("MSG format( Formattable&, ... ) result:" + result);
1076 dataerrln("*** MSG format( Formattable&, .... ) err. - %s", u_errorName(err));
1078 logln("MSG format( Formattable&, ... ) tested.");
1171 const Format** formats = msg.getFormats(count);
1172 const Format** formatsCmp = msgCmp.getFormats(countCmp);
1173 const Format** formatsChg = 0;
1174 const Format** formatsAct = 0;
1176 const Format* a;
1177 const Format* b;
1180 Format** formatsToAdopt;
1261 formatsToAdopt = new Format* [countCmp];
1273 errln("Can't clone format at index %d", i);
1309 formatsToAdopt = new Format* [countCmp];
1321 errln("Can't clone format at index %d", i);
1380 result = fmt1->format( &fargs, 1, resultStr, fp, status );
1390 result = fmt1->format( &fargs, 1, resultStr, fp, status );
1391 result = fmt2->format( &fargs, 1, resultStr, fp, status );
1392 result = fmt3->format( &fargs, 1, resultStr, fp, status );
1393 result = fmt4->format( &fargs, 1, resultStr, fp, status );
1449 msg.format(ARGS_OBJ, result, ec);
1458 // test RBNF extensions to message format
1466 // decimal values do not format completely for ordinal or duration, and
1492 logln((UnicodeString)"Testing format pattern: '" + formats[i] + "'");
1502 fmt->format(args, 1, result, fp, ec);
1505 if (i != 3) { // TODO: fix this, for now skip ordinal parsing (format string at index 3)
1580 errln("FAIL: Unable to get format names enumeration.");
1586 errln("FAIL: Unable to get format name enumeration count.");
1619 errln("FAIL: Should fail to get format names enumeration instead of passing.");