From f0eb1dfbf1eaef252a23060b1895d61149dc7e97 Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Tue, 7 Nov 2023 19:02:22 -0600 Subject: [PATCH] Exclude tests that fail in Java8 legacy dev mode Note that these would pass in legacy dev mode in Java 11/17, but we don't run legacy dev mode tests for those JVMs for a variety of reasons. --- .../gwt/emultest/java8/util/stream/DoubleStreamTest.java | 6 ++++++ .../gwt/emultest/java8/util/stream/IntStreamTest.java | 6 ++++++ .../gwt/emultest/java8/util/stream/LongStreamTest.java | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/user/test/com/google/gwt/emultest/java8/util/stream/DoubleStreamTest.java b/user/test/com/google/gwt/emultest/java8/util/stream/DoubleStreamTest.java index 66389b4665..1cc6fbce97 100644 --- a/user/test/com/google/gwt/emultest/java8/util/stream/DoubleStreamTest.java +++ b/user/test/com/google/gwt/emultest/java8/util/stream/DoubleStreamTest.java @@ -17,6 +17,8 @@ package com.google.gwt.emultest.java8.util.stream; import com.google.gwt.emultest.java.util.EmulTestBase; +import com.google.gwt.junit.DoNotRunWith; +import com.google.gwt.junit.Platform; import java.util.ArrayList; import java.util.Arrays; @@ -113,6 +115,10 @@ public void testConcat() { assertEquals(Arrays.asList("first", "second"), closed); } + // Java8 has the same bug that GWT previously had here, so we're excluding Java8 from running + // this test. Presently, legacy dev mode is the only way to actually run this test using the + // JVM's own implementation, so marking this DoNotRunWith(Devel) is sufficient to avoid this. + @DoNotRunWith(Platform.Devel) public void testIterate() { assertEquals( new double[] {10d, 11d, 12d, 13d, 14d}, diff --git a/user/test/com/google/gwt/emultest/java8/util/stream/IntStreamTest.java b/user/test/com/google/gwt/emultest/java8/util/stream/IntStreamTest.java index a386fd2477..d9b4ebb830 100644 --- a/user/test/com/google/gwt/emultest/java8/util/stream/IntStreamTest.java +++ b/user/test/com/google/gwt/emultest/java8/util/stream/IntStreamTest.java @@ -17,6 +17,8 @@ package com.google.gwt.emultest.java8.util.stream; import com.google.gwt.emultest.java.util.EmulTestBase; +import com.google.gwt.junit.DoNotRunWith; +import com.google.gwt.junit.Platform; import java.util.ArrayList; import java.util.Arrays; @@ -112,6 +114,10 @@ public void testConcat() { assertEquals(Arrays.asList("first", "second"), closed); } + // Java8 has the same bug that GWT previously had here, so we're excluding Java8 from running + // this test. Presently, legacy dev mode is the only way to actually run this test using the + // JVM's own implementation, so marking this DoNotRunWith(Devel) is sufficient to avoid this. + @DoNotRunWith(Platform.Devel) public void testIterate() { assertEquals( new int[] {10, 11, 12, 13, 14}, diff --git a/user/test/com/google/gwt/emultest/java8/util/stream/LongStreamTest.java b/user/test/com/google/gwt/emultest/java8/util/stream/LongStreamTest.java index e73cf0af01..6297afdf71 100644 --- a/user/test/com/google/gwt/emultest/java8/util/stream/LongStreamTest.java +++ b/user/test/com/google/gwt/emultest/java8/util/stream/LongStreamTest.java @@ -17,6 +17,8 @@ package com.google.gwt.emultest.java8.util.stream; import com.google.gwt.emultest.java.util.EmulTestBase; +import com.google.gwt.junit.DoNotRunWith; +import com.google.gwt.junit.Platform; import java.util.ArrayList; import java.util.Arrays; @@ -111,6 +113,10 @@ public void testConcat() { assertEquals(Arrays.asList("first", "second"), closed); } + // Java8 has the same bug that GWT previously had here, so we're excluding Java8 from running + // this test. Presently, legacy dev mode is the only way to actually run this test using the + // JVM's own implementation, so marking this DoNotRunWith(Devel) is sufficient to avoid this. + @DoNotRunWith(Platform.Devel) public void testIterate() { assertEquals( new long[] {10L, 11L, 12L, 13L, 14L},