Imported Upstream version 58.1
[platform/upstream/icu.git] / source / test / intltest / callimts.cpp
index 8f25fb0..b64f13e 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: 
  * Copyright (c) 1997-2015, International Business Machines Corporation
@@ -414,18 +416,37 @@ CalendarLimitTest::doLimitsTest(Calendar& cal,
                       ", actual_min=" + minActual);
             }
             if (maxActual < maxLow || maxActual > maxHigh) {
-                errln((UnicodeString)"Fail: [" + cal.getType() + "] " +
-                      ymdToString(cal, ymd) +
-                      " Range for max of " + FIELD_NAME[f] + "(" + f +
-                      ")=" + maxLow + ".." + maxHigh +
-                      ", actual_max=" + maxActual);
+                if ( uprv_strcmp(cal.getType(), "chinese") == 0 &&
+                        testMillis >= 2842992000000.0  && testMillis <= 2906668800000.0 &&
+                     logKnownIssue("12620", "chinese calendar failures for some actualMax tests")) {
+                    logln((UnicodeString)"KnownFail: [" + cal.getType() + "] " +
+                          ymdToString(cal, ymd) +
+                          " Range for max of " + FIELD_NAME[f] + "(" + f +
+                          ")=" + maxLow + ".." + maxHigh +
+                          ", actual_max=" + maxActual);
+                } else {
+                    errln((UnicodeString)"Fail: [" + cal.getType() + "] " +
+                          ymdToString(cal, ymd) +
+                          " Range for max of " + FIELD_NAME[f] + "(" + f +
+                          ")=" + maxLow + ".." + maxHigh +
+                          ", actual_max=" + maxActual);
+                }
             }
             if (v < minActual || v > maxActual) {
                 // timebomb per #9967, fix with #9972
                 if ( uprv_strcmp(cal.getType(), "dangi") == 0 &&
                         testMillis >= 1865635198000.0  &&
                      logKnownIssue("9972", "as per #9967")) { // Feb 2029 gregorian, end of dangi 4361
-                    logln((UnicodeString)"Fail: [" + cal.getType() + "] " +
+                    logln((UnicodeString)"KnownFail: [" + cal.getType() + "] " +
+                          ymdToString(cal, ymd) +
+                          " " + FIELD_NAME[f] + "(" + f + ")=" + v +
+                          ", actual=" + minActual + ".." + maxActual +
+                          ", allowed=(" + minLow + ".." + minHigh + ")..(" +
+                          maxLow + ".." + maxHigh + ")");
+                } else if ( uprv_strcmp(cal.getType(), "chinese") == 0 &&
+                        testMillis >= 2842992000000.0  && testMillis <= 2906668800000.0 &&
+                     logKnownIssue("12620", "chinese calendar failures for some actualMax tests")) {
+                    logln((UnicodeString)"KnownFail: [" + cal.getType() + "] " +
                           ymdToString(cal, ymd) +
                           " " + FIELD_NAME[f] + "(" + f + ")=" + v +
                           ", actual=" + minActual + ".." + maxActual +