From 9b428833c50a28c0e9bda846f5dc25cac6f17462 Mon Sep 17 00:00:00 2001 From: Yoshito Umaoka Date: Wed, 10 Oct 2012 16:19:37 +0000 Subject: [PATCH] ICU-9645 Fixed the test case Test5006GetShortMonths and removed the timebomb. X-SVN-Rev: 32588 --- icu4j/build.properties | 6 ++-- icu4j/eclipse-build/build.properties | 2 +- .../src/com/ibm/icu/util/VersionInfo.java | 4 +-- icu4j/main/shared/build/common.properties | 2 +- .../ibm/icu/dev/test/search/SearchTest.java | 4 +-- .../icu/dev/test/calendar/ChineseTest.java | 2 +- .../test/format/DateFormatRegressionTest.java | 36 +++++++------------ .../icu/dev/test/translit/RoundTripTest.java | 4 +-- 8 files changed, 24 insertions(+), 36 deletions(-) diff --git a/icu4j/build.properties b/icu4j/build.properties index cdbd9c32005..af561adab80 100644 --- a/icu4j/build.properties +++ b/icu4j/build.properties @@ -2,8 +2,8 @@ #* Copyright (C) 2009-2012, International Business Machines Corporation and * #* others. All Rights Reserved. * #******************************************************************************* -api.report.version = 50m2 +api.report.version = 50 api.report.prev.version = 49 -release.file.ver = 50m2 -api.doc.version = 50 Milestone 2 +release.file.ver = 50rc +api.doc.version = 50 Release Candidate diff --git a/icu4j/eclipse-build/build.properties b/icu4j/eclipse-build/build.properties index e8d55fe7b3f..0eb009b2bc0 100644 --- a/icu4j/eclipse-build/build.properties +++ b/icu4j/eclipse-build/build.properties @@ -2,6 +2,6 @@ #* Copyright (C) 2010-2012, International Business Machines Corporation and * #* others. All Rights Reserved. * #******************************************************************************* -icu4j.plugin.impl.version.string=50.0.2 +icu4j.plugin.impl.version.string=50.1.0 copyright.eclipse=Licensed Materials - Property of IBM \n (C) Copyright IBM Corp. 2000, 2012. All Rights Reserved. \n IBM is a registered trademark of IBM Corp. icu4j.data.version.number=50 diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/VersionInfo.java b/icu4j/main/classes/core/src/com/ibm/icu/util/VersionInfo.java index 3ed850dfc50..8bf9c9f9367 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/VersionInfo.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/VersionInfo.java @@ -502,8 +502,8 @@ public final class VersionInfo implements Comparable UNICODE_6_1 = getInstance(6, 1, 0, 0); UNICODE_6_2 = getInstance(6, 2, 0, 0); - ICU_VERSION = getInstance(50, 0, 2, 0); - ICU_DATA_VERSION = getInstance(50, 0, 2, 0); + ICU_VERSION = getInstance(50, 1, 0, 0); + ICU_DATA_VERSION = getInstance(50, 1, 0, 0); UNICODE_VERSION = UNICODE_6_2; UCOL_RUNTIME_VERSION = getInstance(7); diff --git a/icu4j/main/shared/build/common.properties b/icu4j/main/shared/build/common.properties index 93f5da4ea49..3095b8e76a7 100644 --- a/icu4j/main/shared/build/common.properties +++ b/icu4j/main/shared/build/common.properties @@ -5,7 +5,7 @@ # Version numbers, etc. icu4j.spec.version = 50 -icu4j.impl.version = 50.0.2 +icu4j.impl.version = 50.1 icu4j.data.version = 50 current.year = 2012 default.exec.env = J2SE-1.5 diff --git a/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/search/SearchTest.java b/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/search/SearchTest.java index d04488111b4..1c26df6a55e 100644 --- a/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/search/SearchTest.java +++ b/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/search/SearchTest.java @@ -1790,7 +1790,7 @@ public class SearchTest extends TestFmwk { } public void TestSupplementary() { - if (isICUVersionBefore(50, 1, 0)) { // ticket#8080 + if (isICUVersionBefore(51, 0, 1)) { // ticket#8080 return; } int count = 0; @@ -1803,7 +1803,7 @@ public class SearchTest extends TestFmwk { } public void TestSupplementaryCanonical() { - if (isICUVersionBefore(50, 1, 0)) { // ticket#8080 + if (isICUVersionBefore(51, 0, 1)) { // ticket#8080 return; } int count = 0; diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/calendar/ChineseTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/calendar/ChineseTest.java index d0d73f0b22b..1586c562877 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/calendar/ChineseTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/calendar/ChineseTest.java @@ -278,7 +278,7 @@ public class ChineseTest extends CalendarTest { Date e = fmt.parse(s); if (e.equals(DATA[i])) { logln("Ok: " + DATA[i] + " -> " + s + " -> " + e); - } else if (isICUVersionBefore(50, 1)) { // until ticket #9043 fixes the ambiguous era problem + } else if (isICUVersionBefore(51, 0, 1)) { // until ticket #9043 fixes the ambiguous era problem logln("Ambiguous parse fails: " + DATA[i] + " -> " + s + " -> " + e); } else { errln("FAIL: " + DATA[i] + " -> " + s + " -> " + e); diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/DateFormatRegressionTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/DateFormatRegressionTest.java index 7bd449ee5e8..fad623d1e16 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/DateFormatRegressionTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/DateFormatRegressionTest.java @@ -1061,10 +1061,12 @@ public class DateFormatRegressionTest extends com.ibm.icu.dev.test.TestFmwk { } } } - - - public void Test5006GetShortMonths() throws Exception { + // Note: The purpose of this test case is a little bit questionable. This test + // case expects Islamic month name is different from Gregorian month name. + // However, some locales (in this code, zh_CN) may intentionally use the same + // month name for both Gregorian and Islamic calendars. See #9645. + public void Test5006GetShortMonths() throws Exception { // Currently supported NLV locales Locale ENGLISH = new Locale("en", "US"); // We don't support 'en' alone Locale ARABIC = new Locale("ar", ""); @@ -1136,11 +1138,6 @@ public class DateFormatRegressionTest extends com.ibm.icu.dev.test.TestFmwk { } - boolean skipIn8822 = isICUVersionBefore(50, 1, 0); - if(skipIn8822) { - logln("Note: some tests timebombed to go off by 50.1"); - } - // Compare for (int i = 0; i < locales.length; i++) { @@ -1150,32 +1147,23 @@ public class DateFormatRegressionTest extends com.ibm.icu.dev.test.TestFmwk { logln(locales[i] + ": g:" + gregorianTwelfthMonth + ", ic:" + islamicCivilTwelfthMonth + ", i:"+islamicTwelfthMonth); if (gregorianTwelfthMonth.equalsIgnoreCase(islamicTwelfthMonth)) { - if(!skipIn8822) { + // Simplified Chinese uses numeric month for both Gregorian/Islamic calendars + if (locales[i] != CHINESE_SIMPLIFIED) { errln(locales[i] + ": gregorian and islamic are same: " + gregorianTwelfthMonth + ", " + islamicTwelfthMonth); - } else { - logln(locales[i] + ": gregorian and islamic are same: " + gregorianTwelfthMonth - + ", " + islamicTwelfthMonth + " (TIMEBOMBED until ICU 50.1)"); } } if (gregorianTwelfthMonth.equalsIgnoreCase(islamicCivilTwelfthMonth)) { - if(!skipIn8822) { + // Simplified Chinese uses numeric month for both Gregorian/Islamic calendars + if (locales[i] != CHINESE_SIMPLIFIED) { errln(locales[i] + ": gregorian and islamic-civil are same: " + gregorianTwelfthMonth - + ", " + islamicCivilTwelfthMonth); - } else { - logln(locales[i] + ": gregorian and islamic-civil are same: " + gregorianTwelfthMonth - + ", " + islamicCivilTwelfthMonth + " (TIMEBOMBED until ICU 50.1)"); + + ", " + islamicCivilTwelfthMonth); } } if (!islamicTwelfthMonth.equalsIgnoreCase(islamicCivilTwelfthMonth)) { - if(!skipIn8822) { - errln(locales[i] + ": islamic-civil and islamic are NOT same: " + islamicCivilTwelfthMonth - + ", " + islamicTwelfthMonth); - } else { - logln(locales[i] + ": islamic-civil and islamic are NOT same: " + islamicCivilTwelfthMonth - + ", " + islamicTwelfthMonth + " (TIMEBOMBED until 50.1)"); - } + errln(locales[i] + ": islamic-civil and islamic are NOT same: " + islamicCivilTwelfthMonth + + ", " + islamicTwelfthMonth); } } } diff --git a/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/RoundTripTest.java b/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/RoundTripTest.java index c5f2223c670..cda88e23298 100644 --- a/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/RoundTripTest.java +++ b/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/RoundTripTest.java @@ -80,9 +80,9 @@ public class RoundTripTest extends TestFmwk { @Override public void init() { - // TODO(Mark): Fix ticket #8989, transliterate U+0970. + // TODO(Mark): Fix ticket #8989 (CLDR#4375), transliterate U+0970. // Remove this method? - beforeICU50 = isICUVersionBefore(50, 1, 0); + beforeICU50 = isICUVersionBefore(51, 0, 1); minusDevAbbBefore50 = beforeICU50 ? "-[\u0970]" : ""; } -- 2.40.0