From ca891fb9e12b29f9f1d650da768da5fcf9ef42ca Mon Sep 17 00:00:00 2001 From: Shane Carr Date: Thu, 5 Oct 2017 04:27:34 +0000 Subject: [PATCH] ICU-13372 Ignore TestDataDrivenJDK instead of Pass when using a different JDK version. X-SVN-Rev: 40564 --- .../test/format/NumberFormatDataDrivenTest.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 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 7fcafc290c9..f0312bef172 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 @@ -752,15 +752,17 @@ public class NumberFormatDataDrivenTest { @Test public void TestDataDrivenJDK() { // Android implements java.text.DecimalFormat with ICU4J (ticket #13322). - if (TestUtil.getJavaVendor() == TestUtil.JavaVendor.Android) return; + // 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. + org.junit.Assume.assumeTrue( + TestUtil.getJavaVendor() != TestUtil.JavaVendor.Android + && TestUtil.getJavaVersion() < 9); if (TestUtil.getJavaVersion() == 8) { - DataDrivenNumberFormatTestUtility.runFormatSuiteIncludingKnownFailures( - "numberformattestspecification.txt", JDK); + DataDrivenNumberFormatTestUtility.runFormatSuiteIncludingKnownFailures( + "numberformattestspecification.txt", JDK); } else { - // 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. return; } } -- 2.50.1