+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/********************************************************************
- * COPYRIGHT:
- * Copyright (c) 1997-2010, International Business Machines Corporation and
+ * COPYRIGHT:
+ * Copyright (c) 1997-2016, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
{
if (exec) logln("TestSuite SimpleDateFormatAPI");
switch (index) {
- case 0: name = "SimpleDateFormat API test";
+ case 0: name = "SimpleDateFormat API test";
if (exec) {
logln("SimpleDateFormat API test---"); logln("");
UErrorCode status = U_ZERO_ERROR;
Formattable fD(d, Formattable::kIsDate);
UnicodeString res1, res2;
- FieldPosition pos1(0), pos2(0);
+ FieldPosition pos1(FieldPosition::DONT_CARE), pos2(FieldPosition::DONT_CARE);
res1 = def.format(d, res1, pos1);
logln( (UnicodeString) "" + d + " formatted to " + res1);
status = U_ZERO_ERROR;
pat.applyLocalizedPattern(p1, status);
if(U_FAILURE(status)) {
- errln("ERROR: applyPattern() failed with " + (int32_t) status);
+ errln("ERROR: applyPattern() failed with %s", u_errorName(status));
}
UnicodeString s3;
status = U_ZERO_ERROR;
if ((double)udDate == 0.0) {
errln("ERROR: Parsing failed using 'Y' and 'e'");
}
+
+// ====== Test ticket 11295 getNumberFormatForField returns wild pointer
+ if (object.getNumberFormatForField('N') != NULL) {
+ errln("N is not a valid field, "
+ "getNumberFormatForField should return NULL");
+ }
}
#endif /* #if !UCONFIG_NO_FORMATTING */