Imported Upstream version 58.1
[platform/upstream/icu.git] / source / test / intltest / tzfmttst.cpp
index d5b31d3..dadcb54 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
 *******************************************************************************
 * Copyright (C) 2007-2015, International Business Machines Corporation and    *
@@ -181,7 +183,7 @@ TimeZoneFormatTest::TestTimeZoneRoundTrip(void) {
 
                 for (int32_t datidx = 0; datidx < nDates; datidx++) {
                     UnicodeString tzstr;
-                    FieldPosition fpos(0);
+                    FieldPosition fpos(FieldPosition::DONT_CARE);
                     // Format
                     sdf->setTimeZone(*tz);
                     sdf->format(DATES[datidx], tzstr, fpos);
@@ -408,7 +410,7 @@ struct LocaleData {
         numDone = 0;
     }
 
-    UBool nextTest(int &rLocaleIndex, int &rPatternIndex) {
+    UBool nextTest(int32_t &rLocaleIndex, int32_t &rPatternIndex) {
         Mutex lock;
         if (patternIndex >= UPRV_LENGTHOF(PATTERNS) - 1) {
             if (localeIndex >= nLocales - 1) {
@@ -651,7 +653,7 @@ void TimeZoneFormatTest::RunTimeRoundTripTests(int32_t threadNumber) {
                     }
 
                     UnicodeString text;
-                    FieldPosition fpos(0);
+                    FieldPosition fpos(FieldPosition::DONT_CARE);
                     sdf->format(testTimes[testidx], text, fpos);
 
                     UDate parsedDate = sdf->parse(text, status);
@@ -831,7 +833,7 @@ TimeZoneFormatTest::TestParse(void) {
             delete tz;
         } else {
             if (DATA[i].expected) {
-                errln((UnicodeString)"Fail: Parse failure - expected: " + DATA[i].expected);
+                errMsg = (UnicodeString)"Parse failure - expected: " + DATA[i].expected;
             }
         }
         if (errMsg.length() > 0) {