Home | History | Annotate | Download | only in intltest

Lines Matching refs:ec

1060     UErrorCode ec = U_ZERO_ERROR;
1075 SimpleDateFormat ref(pattern, loc, ec);
1076 if (U_FAILURE(ec)) {
1077 dataerrln("contruct SimpleDateFormat in expect failed: %s", u_errorName(ec));
1087 UDate date = ref.parse(ctou(datestr), ec);
1088 if (!assertSuccess("parse 1st data in expect", ec)) return;
1089 UDate date_2 = ref.parse(ctou(datestr_2), ec);
1090 if (!assertSuccess("parse 2nd data in expect", ec)) return;
1095 DateIntervalFormat* dtitvfmt = DateIntervalFormat::createInstance(oneSkeleton, loc, ec);
1096 if (!assertSuccess("createInstance(skeleton) in expect", ec)) return;
1098 dtitvfmt->format(&dtitv, str.remove(), pos, ec);
1099 if (!assertSuccess("format in expect", ec)) return;
1179 UErrorCode ec = U_ZERO_ERROR;
1180 LocalPointer<DateIntervalInfo> dtitvinf(new DateIntervalInfo(ec));
1181 if (U_FAILURE(ec)) {
1182 errln("Failure encountered: %s", u_errorName(ec));
1186 dtitvinf->getIntervalPattern(ctou("yMd"), UCAL_DATE, expected, ec);
1187 dtitvinf->setIntervalPattern(ctou("yMd"), UCAL_DATE, ctou("M/d/y \\u2013 d"), ec);
1188 if (U_FAILURE(ec)) {
1189 errln("Failure encountered: %s", u_errorName(ec));
1192 dtitvinf.adoptInstead(new DateIntervalInfo(ec));
1193 if (U_FAILURE(ec)) {
1194 errln("Failure encountered: %s", u_errorName(ec));
1198 dtitvinf->getIntervalPattern(ctou("yMd"), UCAL_DATE, actual, ec);
1199 if (U_FAILURE(ec)) {
1200 errln("Failure encountered: %s", u_errorName(ec));
1213 UErrorCode ec = U_ZERO_ERROR;
1220 SimpleDateFormat ref(pattern, loc, ec);
1221 if (U_FAILURE(ec)) {
1222 dataerrln("contruct SimpleDateFormat in expectUserDII failed: %s", u_errorName(ec));
1227 UDate date = ref.parse(ctou(datestr), ec);
1228 if (!assertSuccess("parse in expectUserDII", ec)) return;
1229 UDate date_2 = ref.parse(ctou(datestr_2), ec);
1230 if (!assertSuccess("parse in expectUserDII", ec)) return;
1233 ec = U_ZERO_ERROR;
1235 DateIntervalInfo* dtitvinf = new DateIntervalInfo(ec);
1236 dtitvinf->setFallbackIntervalPattern("{0} --- {1}", ec);
1237 dtitvinf->setIntervalPattern(UDAT_YEAR_ABBR_MONTH_DAY, UCAL_MONTH, "yyyy MMM d - MMM y",ec);
1238 if (!assertSuccess("DateIntervalInfo::setIntervalPattern", ec)) return;
1239 dtitvinf->setIntervalPattern(UDAT_YEAR_ABBR_MONTH_DAY, UCAL_HOUR_OF_DAY, "yyyy MMM d HH:mm - HH:mm", ec);
1240 if (!assertSuccess("DateIntervalInfo::setIntervalPattern", ec)) return;
1241 DateIntervalFormat* dtitvfmt = DateIntervalFormat::createInstance(UDAT_YEAR_ABBR_MONTH_DAY, loc, *dtitvinf, ec);
1243 if (!assertSuccess("createInstance(skeleton,dtitvinf) in expectUserDII", ec)) return;
1245 dtitvfmt->format(&dtitv, str.remove(), pos, ec);
1246 if (!assertSuccess("format in expectUserDII", ec)) return;
1368 UErrorCode ec = U_ZERO_ERROR;
1370 SimpleDateFormat ref(data[i++], loc, ec);
1371 if (!assertSuccess("construct SimpleDateFormat", ec)) return;
1389 UDate date = ref.parse(ctou(datestr), ec);
1390 if (!assertSuccess("parse", ec)) return;
1391 UDate date_2 = ref.parse(ctou(datestr_2), ec);
1392 if (!assertSuccess("parse", ec)) return;
1399 DateIntervalFormat* dtitvfmt = DateIntervalFormat::createInstance(oneSkeleton, loc, ec);
1400 if (!assertSuccess("createInstance(skeleton)", ec)) return;
1404 GregorianCalendar* gregCal = new GregorianCalendar(loc, ec);
1405 if (!assertSuccess("GregorianCalendar()", ec)) return;
1409 //dtitvfmt->adoptDateFormat(newOne, ec);
1410 dtitvfmt->setDateFormat(*newOne, ec);
1412 if (!assertSuccess("adoptDateFormat()", ec)) return;
1416 dtitvfmt->format(&dtitv, str.remove(), pos, ec);
1417 if (!assertSuccess("format", ec)) return;
1430 ec = U_ZERO_ERROR;
1431 DateIntervalInfo* dtitvinf = new DateIntervalInfo(ec);
1432 dtitvinf->setFallbackIntervalPattern("{0} --- {1}", ec);
1433 dtitvinf->setIntervalPattern(UDAT_YEAR_ABBR_MONTH_DAY, UCAL_MONTH, "yyyy MMM d - MMM y",ec);
1434 if (!assertSuccess("DateIntervalInfo::setIntervalPattern", ec)) return;
1435 dtitvinf->setIntervalPattern(UDAT_YEAR_ABBR_MONTH_DAY, UCAL_HOUR_OF_DAY, "yyyy MMM d HH:mm - HH:mm", ec);
1436 if (!assertSuccess("DateIntervalInfo::setIntervalPattern", ec)) return;
1437 DateIntervalFormat* dtitvfmt = DateIntervalFormat::createInstance(UDAT_YEAR_ABBR_MONTH_DAY, loc, *dtitvinf, ec);
1439 if (!assertSuccess("createInstance(skeleton,dtitvinf)", ec)) return;
1441 dtitvfmt->format(&dtitv, str.remove(), pos, ec);
1443 if (!assertSuccess("format", ec)) return;
1453 assertTrue("Default calendar for \"th\" is Budhist", ec == U_ILLEGAL_ARGUMENT_ERROR);
1454 ec = U_ZERO_ERROR;