From 8d3fb63bd2fb35f9cf8e45d3fd8fde42de983cff Mon Sep 17 00:00:00 2001 From: Shane Carr Date: Wed, 16 May 2018 23:55:51 +0000 Subject: [PATCH] ICU-13373 Change TestDataDrivenJDK from blacklist to whitelist. X-SVN-Rev: 41391 --- .../test/format/NumberFormatDataDrivenTest.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/NumberFormatDataDrivenTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/NumberFormatDataDrivenTest.java index 3bf1db732d3..35ff0bad797 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/NumberFormatDataDrivenTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/NumberFormatDataDrivenTest.java @@ -758,21 +758,16 @@ public class NumberFormatDataDrivenTest { "numberformattestspecification.txt", ICU58); } - // Note: This test case is really questionable. Depending on Java version, - // something may or may not work. However the test data assumes a specific - // Java runtime version. We should probably disable this test case - #13372 @Test public void TestDataDrivenJDK() { - // Android implements java.text.DecimalFormat with ICU4J (ticket #13322). - // Oracle/OpenJDK 9's behavior is not exactly same with Oracle/OpenJDK 8. - // Some test cases failed on 8 work well, while some other test cases - // fail on 9, but worked on 8. Skip this test case if Java version is not 8. + // #13373: Since not all JDK implementations are the same, test only whitelisted JDKs + // with known behavior. The JDK version should be occasionally updated. org.junit.Assume.assumeTrue( - TestUtil.getJavaVendor() != TestUtil.JavaVendor.Android - && TestUtil.getJavaVersion() < 9); + TestUtil.getJavaRuntimeName() == TestUtil.JavaRuntimeName.OpenJDK + && TestUtil.getJavaVersion() == 8); DataDrivenNumberFormatTestUtility.runFormatSuiteIncludingKnownFailures( - "numberformattestspecification.txt", JDK); + "numberformattestspecification.txt", JDK); } @Test -- 2.40.0