]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/intltest/sdtfmtts.cpp
ICU-59131.0.1.tar.gz
[apple/icu.git] / icuSources / test / intltest / sdtfmtts.cpp
index 546b43ccac9f4ad475346bb9f4230100f4fb5635..ba48346bf1d9ec51114692296c420084339059ad 100644 (file)
@@ -1,7 +1,9 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 
 /********************************************************************
- * COPYRIGHT: 
- * Copyright (c) 1997-2014, International Business Machines Corporation and
+ * COPYRIGHT:
+ * Copyright (c) 1997-2016, International Business Machines Corporation and
  * others. All Rights Reserved.
  ********************************************************************/
 
@@ -22,7 +24,7 @@ void IntlTestSimpleDateFormatAPI::runIndexedTest( int32_t index, UBool exec, con
 {
     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;
@@ -142,7 +144,7 @@ void IntlTestSimpleDateFormatAPI::testAPI(/*char *par*/)
     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);
@@ -271,8 +273,8 @@ void IntlTestSimpleDateFormatAPI::testAPI(/*char *par*/)
     }
 
 // ====== Test ticket 11295 getNumberFormatForField returns wild pointer
-    if (object.getNumberFormatForField('B') != NULL) {
-        errln("B is not a valid field, "
+    if (object.getNumberFormatForField('N') != NULL) {
+        errln("N is not a valid field, "
               "getNumberFormatForField should return NULL");
     }
 }