diff --git a/javatests/com/google/turbine/lower/MissingJavaBaseModuleTest.java b/javatests/com/google/turbine/lower/MissingJavaBaseModuleTest.java index 740aecce..0c482148 100644 --- a/javatests/com/google/turbine/lower/MissingJavaBaseModuleTest.java +++ b/javatests/com/google/turbine/lower/MissingJavaBaseModuleTest.java @@ -16,15 +16,13 @@ package com.google.turbine.lower; -import static com.google.common.base.StandardSystemProperty.JAVA_CLASS_VERSION; import static com.google.common.collect.ImmutableMap.toImmutableMap; -import static org.junit.Assert.assertEquals; +import static com.google.common.truth.Truth.assertThat; import com.google.common.base.Supplier; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.turbine.binder.ClassPath; -import com.google.turbine.binder.CtSymClassBinder; import com.google.turbine.binder.JimageClassBinder; import com.google.turbine.binder.bound.ModuleInfo; import com.google.turbine.binder.bytecode.BytecodeBoundClass; @@ -51,10 +49,7 @@ public void test() throws Exception { IntegrationTestSupport.runJavac( sources, ImmutableList.of(), ImmutableList.of("--release", "9", "--module-version=42")); - ClassPath base = - Double.parseDouble(JAVA_CLASS_VERSION.value()) < 54 - ? JimageClassBinder.bindDefault() - : CtSymClassBinder.bind(9); + ClassPath base = JimageClassBinder.bindDefault(); ClassPath bootclasspath = new ClassPath() { @Override @@ -93,7 +88,10 @@ public TopLevelIndex index() { Optional.of("42"), /* javacopts= */ ImmutableList.of()); - assertEquals(dump(expected), dump(actual)); + // normalize output after https://bugs.openjdk.org/browse/JDK-8320766 + String expectedOutput = dump(expected).replace(" // version 9\n", ""); + + assertThat(dump(actual)).isEqualTo(expectedOutput); } private String dump(Map map) throws Exception {