Lines Matching refs:itemPtr
3856 const NumAsStringItem * itemPtr; in TestNumberAsStringParsing() local
3857 for (itemPtr = items; itemPtr->localeStr != NULL; itemPtr++ ) { in TestNumberAsStringParsing()
3858 Locale locale = Locale::createFromName(itemPtr->localeStr); in TestNumberAsStringParsing()
3860 SimpleDateFormat *formatter = new SimpleDateFormat(itemPtr->datePattern, locale, status); in TestNumberAsStringParsing()
3866 formatter->setLenient(itemPtr->lenient); in TestNumberAsStringParsing()
3867 …tribute(UDAT_PARSE_ALLOW_WHITESPACE, itemPtr->lenient, status).setBooleanAttribute(UDAT_PARSE_ALLO… in TestNumberAsStringParsing()
3868 UDate date1 = formatter->parse(itemPtr->dateString, status); in TestNumberAsStringParsing()
3870 if (!itemPtr->expectFail) { in TestNumberAsStringParsing()
3871 …rr when expected success: Locale \"" + UnicodeString(itemPtr->localeStr) + "\", lenient " + itemPt… in TestNumberAsStringParsing()
3872 …": using pattern \"" + itemPtr->datePattern + "\", could not parse \"" + itemPtr->dateString + "\"… in TestNumberAsStringParsing()
3874 } else if (itemPtr->expectFail) { in TestNumberAsStringParsing()
3875 …xpected err but got none: Locale \"" + UnicodeString(itemPtr->localeStr) + "\", lenient " + itemPt… in TestNumberAsStringParsing()
3876 … ": using pattern \"" + itemPtr->datePattern + "\", did parse \"" + itemPtr->dateString + "\"." ); in TestNumberAsStringParsing()
3877 } else if (!itemPtr->lenient) { in TestNumberAsStringParsing()
3880 if (formatted != itemPtr->dateString) { in TestNumberAsStringParsing()
3881 …h formatting parsed date: Locale \"" + UnicodeString(itemPtr->localeStr) + "\", lenient " + itemPt… in TestNumberAsStringParsing()
3882 …": using pattern \"" + itemPtr->datePattern + "\", did parse \"" + itemPtr->dateString + "\", form… in TestNumberAsStringParsing()
4122 const MonthPatternItem * itemPtr; in TestMonthPatterns() local
4123 for (itemPtr = items; itemPtr->locale != NULL; itemPtr++ ) { in TestMonthPatterns()
4124 Locale locale = Locale::createFromName(itemPtr->locale); in TestMonthPatterns()
4125 DateFormat * dmft = (itemPtr->style >= 0)? in TestMonthPatterns()
4126 DateFormat::createDateInstance((DateFormat::EStyle)itemPtr->style, locale): in TestMonthPatterns()
4127 new SimpleDateFormat(customPatterns[-itemPtr->style - 1], locale, status); in TestMonthPatterns()
4140 if ( result.compare(itemPtr->dateString[idate]) != 0 ) { in TestMonthPatterns()
4141 …L: Chinese calendar format for locale ") + UnicodeString(itemPtr->locale) + ", style " + itemPtr->… in TestMonthPatterns()
4142 … ", expected \"" + itemPtr->dateString[idate] + "\", got \"" + result + "\""); in TestMonthPatterns()
4158 …IL: Chinese calendar parse for locale ") + UnicodeString(itemPtr->locale) + ", style " + itemPtr->… in TestMonthPatterns()
4213 const TestContextItem * itemPtr; in TestContext() local
4214 for (itemPtr = items; itemPtr->locale != NULL; itemPtr++ ) { in TestContext()
4215 Locale locale = Locale::createFromName(itemPtr->locale); in TestContext()
4217 SimpleDateFormat * sdmft = new SimpleDateFormat(itemPtr->pattern, locale, status); in TestContext()
4219 … to create SimpleDateFormat for specified pattern with locale ") + UnicodeString(itemPtr->locale)); in TestContext()
4221 sdmft->setContext(itemPtr->capitalizationContext, status); in TestContext()
4225 if (result.compare(itemPtr->expectedFormat) != 0) { in TestContext()
4226 … errln(UnicodeString("FAIL: format for locale ") + UnicodeString(itemPtr->locale) + in TestContext()
4228 ", capitalizationContext " + (int)itemPtr->capitalizationContext + in TestContext()
4229 ", expected " + itemPtr->expectedFormat + ", got " + result); in TestContext()
4308 const TestNonGregoItem * itemPtr; in TestNonGregoFmtParse() local
4309 for (itemPtr = items; itemPtr->locale != NULL; itemPtr++) { in TestNonGregoFmtParse()
4310 Locale locale = Locale::createFromName(itemPtr->locale); in TestNonGregoFmtParse()
4313 if (itemPtr->style != DateFormat::kNone) { in TestNonGregoFmtParse()
4314 dfmt = DateFormat::createDateInstance(itemPtr->style, locale); in TestNonGregoFmtParse()
4316 dfmt = new SimpleDateFormat(itemPtr->pattern, locale, status); in TestNonGregoFmtParse()
4319 dataerrln("new SimpleDateFormat fails for locale %s", itemPtr->locale); in TestNonGregoFmtParse()
4321 dataerrln("DateFormat::createDateInstance fails for locale %s", itemPtr->locale); in TestNonGregoFmtParse()
4325 … dataerrln("(DateFormat::getCalendar)->clone() fails for locale %s", itemPtr->locale); in TestNonGregoFmtParse()
4328 for (caftItemPtr = itemPtr->caftItems; caftItemPtr->year != 0; caftItemPtr++) { in TestNonGregoFmtParse()
4340 …eString("FAIL: date format for locale ") + UnicodeString(itemPtr->locale) + ", style " + itemPtr->… in TestNonGregoFmtParse()
4353 … errln( UnicodeString("FAIL: date parse for locale ") + UnicodeString(itemPtr->locale) + in TestNonGregoFmtParse()
4354 … ", style " + itemPtr->style + ", string \"" + result + "\", expected " + in TestNonGregoFmtParse()
4386 const TestFmtWithNumSysItem * itemPtr; in TestFormatsWithNumberSystems() local
4387 for (itemPtr = items; itemPtr->localeID != NULL; itemPtr++) { in TestFormatsWithNumberSystems()
4391 Locale locale = Locale::createFromName(itemPtr->localeID); in TestFormatsWithNumberSystems()
4394 …dataerrln("Calendar::createInstance fails for locale %s, status %s", itemPtr->localeID, u_errorNam… in TestFormatsWithNumberSystems()
4399 …dataerrln("Calendar::setTime fails for locale %s, date %.1f, status %s", itemPtr->localeID, date, … in TestFormatsWithNumberSystems()
4402 …at> sdfmt(static_cast<SimpleDateFormat *>(DateFormat::createDateInstance(itemPtr->style, locale))); in TestFormatsWithNumberSystems()
4404 dataerrln("DateFormat::createDateInstance fails for locale %s", itemPtr->localeID); in TestFormatsWithNumberSystems()
4410 …errln("DateFormat::format fails for locale %s, status %s", itemPtr->localeID, u_errorName(status)); in TestFormatsWithNumberSystems()
4413 if (getFormat.compare(itemPtr->expectFormat) != 0) { in TestFormatsWithNumberSystems()
4414 itemPtr->expectFormat.extract(0, itemPtr->expectFormat.length(), bExpected, kBBufMax); in TestFormatsWithNumberSystems()
4416 …errln("DateFormat::format for locale %s, expected \"%s\", got \"%s\"", itemPtr->localeID, bExpecte… in TestFormatsWithNumberSystems()
4420 if (getPattern.compare(itemPtr->expectPattern) != 0) { in TestFormatsWithNumberSystems()
4421 itemPtr->expectPattern.extract(0, itemPtr->expectPattern.length(), bExpected, kBBufMax); in TestFormatsWithNumberSystems()
4423 …errln("DateFormat::toPattern() for locale %s, expected \"%s\", got \"%s\"", itemPtr->localeID, bEx… in TestFormatsWithNumberSystems()
4525 const TestDateFormatLeniencyItem * itemPtr; in TestDateFormatLeniency() local
4527 for (itemPtr = items; itemPtr->locale != NULL; itemPtr++ ) { in TestDateFormatLeniency()
4529 Locale locale = Locale::createFromName(itemPtr->locale); in TestDateFormatLeniency()
4532 …sdmft.adoptInsteadAndCheckErrorCode(new SimpleDateFormat(itemPtr->pattern, locale, status), status… in TestDateFormatLeniency()
4537 sdmft->setBooleanAttribute(UDAT_PARSE_ALLOW_WHITESPACE, itemPtr->leniency, status). in TestDateFormatLeniency()
4538 setBooleanAttribute(UDAT_PARSE_ALLOW_NUMERIC, itemPtr->leniency, status). in TestDateFormatLeniency()
4539 setBooleanAttribute(UDAT_PARSE_PARTIAL_LITERAL_MATCH, itemPtr->leniency, status); in TestDateFormatLeniency()
4540 UDate d = sdmft->parse(itemPtr->parseString, pos); in TestDateFormatLeniency()
4542 if(itemPtr->expectedResult.length() == 0) { in TestDateFormatLeniency()
4546 errln("error: unexpected parse success - " + itemPtr->parseString + in TestDateFormatLeniency()
4547 " - pattern " + itemPtr->pattern + in TestDateFormatLeniency()
4549 " - leniency " + itemPtr->leniency); in TestDateFormatLeniency()
4554 errln("error: parse error for string - " + itemPtr->parseString + in TestDateFormatLeniency()
4555 " - pattern " + itemPtr->pattern + in TestDateFormatLeniency()
4558 " - leniency " + itemPtr->leniency); in TestDateFormatLeniency()
4564 if(formatResult.compare(itemPtr->expectedResult) != 0) { in TestDateFormatLeniency()
4565 …errln("error: unexpected format result. pattern["+itemPtr->pattern+"] expected[" + itemPtr->expect… in TestDateFormatLeniency()
4623 const TestMultiPatternMatchItem * itemPtr; in TestParseMultiPatternMatch() local
4629 for (itemPtr = items; itemPtr->parseString != "--end--"; itemPtr++ ) { in TestParseMultiPatternMatch()
4632 ((SimpleDateFormat*) sdmft)->applyPattern(itemPtr->pattern); in TestParseMultiPatternMatch()
4637 … sdmft->setBooleanAttribute(UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH, itemPtr->leniency, status); in TestParseMultiPatternMatch()
4638 UDate d = sdmft->parse(itemPtr->parseString, pos); in TestParseMultiPatternMatch()
4640 if(itemPtr->expectedResult.length() == 0) { in TestParseMultiPatternMatch()
4644 errln("error: unexpected parse success - " + itemPtr->parseString + in TestParseMultiPatternMatch()
4646 " - leniency " + itemPtr->leniency); in TestParseMultiPatternMatch()
4651 …errln("error: parse error for string - " +itemPtr->parseString + " -- idx["+pos.getIndex()+"] errI… in TestParseMultiPatternMatch()
4657 if(formatResult.compare(itemPtr->expectedResult) != 0) { in TestParseMultiPatternMatch()
4658 …errln("error: unexpected format result. expected[" + itemPtr->expectedResult + "] but result was[… in TestParseMultiPatternMatch()