ICU-9645 Fixed the test case Test5006GetShortMonths and removed the timebomb.

X-SVN-Rev: 32588
This commit is contained in:
Yoshito Umaoka 2012-10-10 16:19:37 +00:00
parent 76b8cbd675
commit 9b428833c5
8 changed files with 24 additions and 36 deletions

View file

@ -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

View file

@ -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

View file

@ -502,8 +502,8 @@ public final class VersionInfo implements Comparable<VersionInfo>
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);

View file

@ -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

View file

@ -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;

View file

@ -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);

View file

@ -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);
}
}
}

View file

@ -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]" : "";
}