Home | History | Annotate | Download | only in intltest

Lines Matching refs:parse

389     UDate d = fmt->parse(*s, status);
396 errln((UnicodeString)"FAIL: Should parse to hour " + hour + " but got " + hr);
640 * General parse/format tests. Add test cases as needed.
692 UDate date = format->parse(str, status);
702 logln(UnicodeString(" parse(") + str + ") -> " + dateToString(date));
742 UDate date2 = formatter->parse(now, pos);
743 if (date2 == 0) then = UnicodeString("Parse stopped at ") + pos.getIndex();
828 UDate d = fmt->parse(juneStr, status);
831 logln((UnicodeString)" -> parse -> " + s + " (month = " + month + ")");
834 d = fmt->parse(julyStr, status);
837 logln((UnicodeString)" -> parse -> " + s + " (month = " + month + ")");
870 UDate myDate = formatter->parse(dateString, pos);
877 myDate = formatter->parse(dateString, pos);
920 UDate d2 = sdf.parse(formatResult, status);
921 logln((UnicodeString)" parse(" + formatResult + ") -> " + dateToString(d2));
993 UDate when = df->parse(text, status);
995 errln(prefix + "SHOULD NOT HAPPEN: parse returned 0.");
1009 errln((UnicodeString)"FAIL: Parse \"" + text + "\", pattern \"" + pattern + "\", expected " + expected + " got " + format);
1098 logln(UnicodeString("Trying to parse \"") + s + "\" with " + dateParse->toPattern(thePat));
1100 date = dateParse->parse(s, status);
1102 errln((UnicodeString)"FAIL: Expected exception during parse");
1106 logln((UnicodeString)"Exception during parse: " + (int32_t)status);
1118 date = dateParse->parse(s, parsePosition);
1134 errln((UnicodeString)"FAIL: Expected parse failure, got " + result);
1136 errln(UnicodeString("FAIL: Parse \"") + s + UnicodeString("\", expected ") + expected + UnicodeString(", got ") + result);
1146 errln((UnicodeString)"An exception was thrown during parse: " + (int32_t)status);
1180 UDate d = fmt.parse(str, status);
1215 UDate tempDate = formatter->parse(temp, status);
1423 /* Parse the date */
1427 date->parse(str, *cal, pos);
1429 errln((UnicodeString)"FAIL: DateFormat::parse(4/5/2001) failed at " +
1434 /* Parse the time */
1437 time->parse(str, *cal, pos);
1439 errln((UnicodeString)"FAIL: DateFormat::parse(17:45) failed at " +
1473 // pattern, input, expected parse or NULL if expect parse failure
1518 // pattern, input, expected parse or NULL if expect parse failure
1539 // pattern, input, expected parse or null if expect parse failure
1541 // Pattern space run should parse input text space run
1577 UDate d2 = fmt.parse(str, pos);
1579 errln("FAIL: unable to parse strings where case-folding changes length");
1901 * [0] = pattern string to parse [i+2] with
1907 * [i+2] = expected parse result (parsed with pattern [0])
1909 * If expect parse failure, then [i+2] should be NULL.
1914 const UnicodeString FAIL_STR("parse failure");
1937 UDate got = fmt.parse(input, ec);
1951 exp = ref.parse(expstr, ec2);
1975 * [0] = pattern string to parse [i+2] with
1987 * 'p': Parse string [i+3] and expect date [i+4].
1991 * then parse string [i+3] and expect date [i+2].
1994 * 'p': Parse string [i+2] and expect date [i+3].
2024 UDate date = ref.parse(ctou(datestr), ec);
2025 if (!assertSuccess("parse", ec)) return;
2031 date = ref.parse(ctou(datestr), ec);
2032 if (!assertSuccess("parse", ec)) return;
2033 UDate parsedate = fmt.parse(ctou(string), ec);
2034 if (assertSuccess((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")", ec)) {
2035 assertEquals((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")",
2045 UDate date = ref.parse(ctou(datestr), ec);
2046 if (!assertSuccess("parse", ec)) return;
2047 UDate parsedate = fmt.parse(ctou(string), ec);
2048 if (assertSuccess((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")", ec)) {
2049 assertEquals((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")",
2063 UDate date = ref.parse(ctou(datestr), ec);
2064 if (!assertSuccess("parse", ec)) return;
2069 UDate parsedate = fmt.parse(string, ec);
2070 if (assertSuccess((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")", ec)) {
2071 assertEquals((UnicodeString)"\"" + currentPat + "\".parse(" + string + ")",
2088 * [0] = pattern string to parse [i+2] with
2125 UDate date = ref.parse(ctou(datestr), ec);
2126 if (!assertSuccess("parse", ec)) return;
2135 // Note: We no longer parse strings in different styles.
2155 // time to parse does not really exist, PT interpreted as earlier time
2163 // time to parse is ambiguous, PT interpreted as later time
2193 // time to parse does not really exist, PT interpreted as earlier time
2198 // time to parse is ambiguous, PT interpreted as later time
2213 logln("cross format/parse tests"); // Note: We no longer support cross format/parse
2236 UDate d = univ.parse(times[i], status);
2243 UDate t = formats[k].parse(test, status);
2255 " could not parse output of format " + j +
2264 // generic times should parse the same no matter what the placement of the time zone string
2266 // Note: We no longer support cross style format/parse
2343 UDate d = univ.parse(tests[i].input, pp);
2443 UDate d = fullrelative->parse(result, status);
2446 UnicodeString parseFormat; // parse rel->format full
2453 errln("FAIL: Relative Parse
2455 logln("PASS: Relative Parse ["+bannerStr+"] of "+result+" passed, got "+parseFormat);
3408 UDate d = testfmt.parse(testLine[2], status);
3505 // Normal case parse result - the given calendar matches the calendar
3507 formatters[i]->parse(refStr, *calendars[i], ppos);
3520 formatters[i]->parse(refStr, *calendars[j], ppos);
3524 errln((UnicodeString)"FAIL: Different parse result with a different calendar for the same string -"
3583 UDate dt11 = fmt1->parse(str1, status);
3584 failure(status, "fmt->parse");
3607 UDate dt22 = fmt2->parse(str2, status);
3608 failure(status, "fmt->parse");
3631 UDate dt33 = fmt3->parse(str3, status);
3632 failure(status, "fmt->parse");
3655 UDate dt44 = fmt4->parse(str4, status);
3656 failure(status, "fmt->parse");
3785 dp1 = fmt->parse(s1, status);
3786 dp2 = fmt->parse(s2, status);
3789 errln("FAIL: Parse failure");
3793 errln("FAIL: Failed to parse " + s1 + " parsed: " + dp1 + " expected: " + dexp1);
3796 errln("FAIL: Failed to parse " + s2 + " parsed: " + dp2 + " expected: " + dexp2);
3850 UDate date1 = formatter->parse(itemPtr->dateString, status);
3854 ": using pattern \"" + itemPtr->datePattern + "\", could not parse \"" + itemPtr->dateString + "\"; err: " + u_errorName(status) );
3858 ": using pattern \"" + itemPtr->datePattern + "\", did parse \"" + itemPtr->dateString + "\"." );
3864 ": using pattern \"" + itemPtr->datePattern + "\", did parse \"" + itemPtr->dateString + "\", formatted result \"" + formatted + "\".");
3899 // parse string to date
3900 UDate dt1 = fmt1->parse(in, status);
3901 failure(status, "fmt->parse", TRUE);
3941 UDate parsedate = sdf->parse(expected,status);
3955 // Incorrect parse offset with stand alone GMT string on 2nd or later iteration.
3965 sdf->parse(inText, pos);
3967 errln((UnicodeString)"FAIL: Incorrect output parse position: actual=" + pos.getIndex() + " expected=3");
4013 //UDate d = sdf->parse(input, pos);
4014 (void)sdf->parse(input, pos);
4126 // formatted OK, try parse
4134 dmft->parse(result, *rootChineseCalendar, ppos);
4140 errln( UnicodeString("FAIL: Chinese calendar parse for locale ") + UnicodeString(itemPtr->locale) + ", style " + itemPtr->style +
4325 // formatted OK, try parse
4327 dfmt->parse(result, *cal, ppos);
4335 errln( UnicodeString("FAIL: date parse for locale ") + UnicodeString(itemPtr->locale) +
4403 UDate parsed = format.parse(formattedString, parsePosition);
4410 errln(pattern + " fails to parse: " + formattedString);
4429 //locale leniency parse String pattern expected result
4461 UDate d = sdmft->parse(itemPtr->parseString, pos);
4467 errln("error: unexpected parse success - " + itemPtr->parseString +
4475 errln("error: parse error for string - " + itemPtr->parseString +
4506 // leniency parse String pattern expected result
4559 UDate d = sdmft->parse(itemPtr->parseString, pos);
4565 errln("error: unexpected parse success - " + itemPtr->parseString +
4572 errln("error: parse error for string - " +itemPtr->parseString + " -- idx["+pos.getIndex()+"] errIdx["+pos.getErrorIndex()+"]");