c2 = ucol_openRules(rules, rulesLength, UCOL_DEFAULT, UCOL_DEFAULT_STRENGTH, NULL, &status);
if (U_FAILURE(status)) {
- log_err("ERROR: Creating collator from rules failed with locale: %s : %s\n", curLoc, myErrorName(status));
+ log_data_err("ERROR: Creating collator from rules failed with locale: %s : %s\n", curLoc, myErrorName(status));
return;
}
void DateFormatTest::TestStandAloneGMTParse() {
UErrorCode status = U_ZERO_ERROR;
SimpleDateFormat *sdf = new SimpleDateFormat("ZZZZ", Locale(""), status);
- failure(status, "new SimpleDateFormat");
-
- UnicodeString inText("GMT$$$");
- for (int32_t i = 0; i < 10; i++) {
- ParsePosition pos(0);
- sdf->parse(inText, pos);
- if (pos.getIndex() != 3) {
- errln((UnicodeString)"FAIL: Incorrect output parse position: actual=" + pos.getIndex() + " expected=3");
+
+ if (!failure(status, "new SimpleDateFormat")) {
+
+ UnicodeString inText("GMT$$$");
+ for (int32_t i = 0; i < 10; i++) {
+ ParsePosition pos(0);
+ sdf->parse(inText, pos);
+ if (pos.getIndex() != 3) {
+ errln((UnicodeString)"FAIL: Incorrect output parse position: actual=" + pos.getIndex() + " expected=3");
+ }
}
- }
- delete sdf;
+ delete sdf;
+ }
}
#endif /* #if !UCONFIG_NO_FORMATTING */