Home | History | Annotate | Download | only in intltest

Lines Matching refs:format

22 #include "unicode/format.h"
136 errln("Err: Number Format ");
137 logln("Number format creation failed.");
143 form->format(myNumber, buffer, pos);
149 errln("Err: Number Format parse");
150 logln("Number format parse failed.");
165 cf->format((int32_t)1, toAppendTo, status);
177 // {sfb} use double format in pattern, so result will match (not strictly necessary)
217 defDateFormat->format(obj.getDate(), buffer);
322 form->format(testArgs, count, result, fieldpos, success);
374 errln("Err: Message format creation failed");
375 logln("Sample message format creation failed.");
382 assertEquals("format",
384 form->format(testArgs1, 2, buffer2, fieldpos, success));
385 assertSuccess("format", success);
399 result = MessageFormat::format(
435 result = MessageFormat::format(
472 form->format(testArgs1, 2, string, ignore, err);
479 form->format(testArgs2, 2, string, ignore, err);
487 form->format(testArgs3, 2, string, ignore, err);
506 //is the format adopted?
511 form->format(testArgs1, 2, string, ignore, err);
519 form->format(testArgs2, 2, string, ignore, err);
527 form->format(testArgs3, 2, string, ignore, err);
556 mfNum->format(&testArgs1, 1, numResult1, ignore, err);
561 mfAlpha->format(argName, &testArgs1, 1, argNameResult, err);
584 mfNum2->format(&testArgs2, 1, numResult1, ignore, err);
587 mfAlpha2->format(argName, &testArgs2, 1, argNameResult, err);
618 msgFmt->format(&testArgs3, 1, argNameResult, ignore, err);
654 //Format with passed arguments
655 msgFmt->format( args , numOfArgs , result, ignore, status);
701 //Format
703 internalFormat( msgFmt1 , testArgs[i], 2, exp[i].unescape() ,(char*)"From TestMessageFormat::testSelectFormat format t1");
723 //Format
725 internalFormat( msgFmt2 , testArgs[i], 2, exp[i].unescape() ,(char*)"From TestMessageFormat::testSelectFormat format t2");
745 //Format
747 internalFormat( msgFmt3 , testArgs[i], 1, exp[i] ,(char*)"From TestMessageFormat::testSelectFormat format t3");
752 //Nested patterns with plural, number ,choice ,select format etc.
753 //Select Format with embedded number format
755 //Create the MessageFormat with Select Format with embedded number format (nested pattern)
767 //Format
769 internalFormat( msgFmt4 , testArgs[i], 3, exp[i].unescape() ,(char*)"From TestMessageFormat::testSelectFormat format t4");
775 //Plural format with embedded select format
778 //Create the MessageFormat with Plural format with embedded select format(nested pattern)
792 //Format
794 internalFormat( msgFmt5 , testArgs[i], 3, exp[i].unescape() ,(char*)"From TestMessageFormat::testSelectFormat format t5");
840 //Format
842 internalFormat( msgFmt6 , testArgs[i], 4, exp[i] ,(char*)"From TestMessageFormat::testSelectFormat format t6");
1003 result = msg.format(
1012 dataerrln("*** MSG format err. - %s", u_errorName(err));
1033 result = msg.format(
1078 result = msg.format(
1086 dataerrln("*** MSG format without expected error code. - %s", u_errorName(err));
1092 result = msg.format(
1099 logln("MSG format( Formattable&, ... ) expected:" + compareStr);
1100 logln("MSG format( Formattable&, ... ) result:" + result);
1102 dataerrln("*** MSG format( Formattable&, .... ) err. - %s", u_errorName(err));
1104 logln("MSG format( Formattable&, ... ) tested.");
1201 const Format** formats = msg.getFormats(count);
1202 const Format** formatsCmp = msgCmp.getFormats(countCmp);
1203 const Format** formatsChg = 0;
1204 const Format** formatsAct = 0;
1206 const Format* a;
1207 const Format* b;
1210 Format** formatsToAdopt;
1296 formatsToAdopt = new Format* [countCmp];
1308 errln("Can't clone format at index %d", i);
1345 formatsToAdopt = new Format* [countCmp];
1357 errln("Can't clone format at index %d", i);
1421 result = fmt1->format( &fargs, 1, resultStr, fp, status );
1440 result = fmt1->format( &fargs, 1, resultStr, fp, status );
1441 result = fmt2->format( &fargs, 1, resultStr, fp, status );
1442 result = fmt3->format( &fargs, 1, resultStr, fp, status );
1443 result = fmt4->format( &fargs, 1, resultStr, fp, status );
1501 msg.format(ARGS_OBJ, result, ec);
1510 // test RBNF extensions to message format
1518 // decimal values do not format completely for ordinal or duration, and
1544 logln((UnicodeString)"Testing format pattern: '" + formats[i] + "'");
1554 fmt->format(args, 1, result, fp, ec);
1557 if (i != 3) { // TODO: fix this, for now skip ordinal parsing (format string at index 3)
1650 compMsg.format(zero0, 1, buffer1, fieldpos, ec));
1653 icuMsg.format(zero0, 1, buffer2, fieldpos, ec));
1667 compMsg.format(zero0, 1, buffer1, fieldpos, ec));
1670 icuMsg.format(zero0, 1, buffer2, fieldpos, ec));
1680 choice.format(0));
1684 choice.format(0));
1746 errln("FAIL: Unable to get format names enumeration.");
1752 errln("FAIL: Unable to get format name enumeration count.");
1764 // adoptFormat() takes ownership of the input Format object.
1766 Format *cfClone = cf.clone();
1790 errln("FAIL: Should work to get format names enumeration regardless of pattern.");
1852 assertEquals("trim-numbered-arg format() failed", "a #,#2.0 z",
1853 m.format(args, 1, result, ignore, errorCode));
1859 assertEquals("trim-named-arg format() failed", "x 3 y",
1860 m.format(&argName, args, 1, result, errorCode));
1877 assertEquals("plural-and-ordinal format(21) failed", "21 files, 21st file",
1878 m.format(args, 1, result, ignore, errorCode), TRUE);
1881 assertEquals("plural-and-ordinal format(2) failed", "2 files, 2nd file",
1882 m.format(args, 1, result.remove(), ignore, errorCode), TRUE);
1885 assertEquals("plural-and-ordinal format(1) failed", "1 file, 1st file",
1886 m.format(args, 1, result.remove(), ignore, errorCode), TRUE);
1889 assertEquals("plural-and-ordinal format(3) failed", "3 files, 3rd file",
1890 m.format(args, 1, result.remove(), ignore, errorCode), TRUE);