Skip to content

Commit 36d32d4

Browse files
cushonJavac Team
authored andcommitted
Prepare a golden test output for https://bugs.openjdk.org/browse/JDK-8320766
PiperOrigin-RevId: 595837447
1 parent f607f6e commit 36d32d4

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

javatests/com/google/turbine/lower/MissingJavaBaseModuleTest.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,13 @@
1616

1717
package com.google.turbine.lower;
1818

19-
import static com.google.common.base.StandardSystemProperty.JAVA_CLASS_VERSION;
2019
import static com.google.common.collect.ImmutableMap.toImmutableMap;
21-
import static org.junit.Assert.assertEquals;
20+
import static com.google.common.truth.Truth.assertThat;
2221

2322
import com.google.common.base.Supplier;
2423
import com.google.common.collect.ImmutableList;
2524
import com.google.common.collect.ImmutableMap;
2625
import com.google.turbine.binder.ClassPath;
27-
import com.google.turbine.binder.CtSymClassBinder;
2826
import com.google.turbine.binder.JimageClassBinder;
2927
import com.google.turbine.binder.bound.ModuleInfo;
3028
import com.google.turbine.binder.bytecode.BytecodeBoundClass;
@@ -51,10 +49,7 @@ public void test() throws Exception {
5149
IntegrationTestSupport.runJavac(
5250
sources, ImmutableList.of(), ImmutableList.of("--release", "9", "--module-version=42"));
5351

54-
ClassPath base =
55-
Double.parseDouble(JAVA_CLASS_VERSION.value()) < 54
56-
? JimageClassBinder.bindDefault()
57-
: CtSymClassBinder.bind(9);
52+
ClassPath base = JimageClassBinder.bindDefault();
5853
ClassPath bootclasspath =
5954
new ClassPath() {
6055
@Override
@@ -93,7 +88,10 @@ public TopLevelIndex index() {
9388
Optional.of("42"),
9489
/* javacopts= */ ImmutableList.of());
9590

96-
assertEquals(dump(expected), dump(actual));
91+
// normalize output after https://bugs.openjdk.org/browse/JDK-8320766
92+
String expectedOutput = dump(expected).replace(" // version 9\n", "");
93+
94+
assertThat(dump(actual)).isEqualTo(expectedOutput);
9795
}
9896

9997
private String dump(Map<String, byte[]> map) throws Exception {

0 commit comments

Comments
 (0)