Update KotlinMetadataTest and ReflectiveConstructionWithInlineClassTest expectations
Change-Id: Idc9e25ffa85d0607d6da6072675a667553e74c74
diff --git a/src/test/java/com/android/tools/r8/kotlin/metadata/syntheticmethodforannotations/KotlinMetadataTest.java b/src/test/java/com/android/tools/r8/kotlin/metadata/syntheticmethodforannotations/KotlinMetadataTest.java
index 8d3693c..c317784 100644
--- a/src/test/java/com/android/tools/r8/kotlin/metadata/syntheticmethodforannotations/KotlinMetadataTest.java
+++ b/src/test/java/com/android/tools/r8/kotlin/metadata/syntheticmethodforannotations/KotlinMetadataTest.java
@@ -1,7 +1,6 @@
// Copyright (c) 2024, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-
package com.android.tools.r8.kotlin.metadata.syntheticmethodforannotations;
import static com.android.tools.r8.ToolHelper.getFilesInTestFolderRelativeToClass;
@@ -120,10 +119,7 @@
.compile()
.inspect(this::verifyRewrittenExtension)
.run(parameters.getRuntime(), MAIN)
- .applyIf(
- parameters.canUseJavaLangInvokeVarHandleStoreStoreFence(),
- rr -> rr.assertFailureWithErrorThatThrows(NullPointerException.class),
- rr -> rr.assertSuccessWithOutputLines(EXPECTED_OUTPUT));
+ .assertSuccessWithOutputLines(EXPECTED_OUTPUT);
}
static JvmMethodSignature toJvmMethodSignature(DexMethod method) {
@@ -182,9 +178,6 @@
.setMinApi(parameters)
.compile()
.run(parameters.getRuntime(), MAIN)
- .applyIf(
- parameters.canUseJavaLangInvokeVarHandleStoreStoreFence(),
- rr -> rr.assertFailureWithErrorThatThrows(NullPointerException.class),
- rr -> rr.assertSuccessWithOutputLines(EXPECTED_FALSE_OUTPUT));
+ .assertSuccessWithOutputLines(EXPECTED_FALSE_OUTPUT);
}
}
diff --git a/src/test/java/com/android/tools/r8/kotlin/reflection/ReflectiveConstructionWithInlineClassTest.java b/src/test/java/com/android/tools/r8/kotlin/reflection/ReflectiveConstructionWithInlineClassTest.java
index 9ec5f51..d83e0b2 100644
--- a/src/test/java/com/android/tools/r8/kotlin/reflection/ReflectiveConstructionWithInlineClassTest.java
+++ b/src/test/java/com/android/tools/r8/kotlin/reflection/ReflectiveConstructionWithInlineClassTest.java
@@ -1,7 +1,6 @@
// Copyright (c) 2022, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-
package com.android.tools.r8.kotlin.reflection;
import com.android.tools.r8.KotlinCompilerTool.KotlinCompilerVersion;
@@ -120,10 +119,7 @@
.assertNoErrorMessages()
.apply(KotlinMetadataTestBase::verifyExpectedWarningsFromKotlinReflectAndStdLib)
.run(parameters.getRuntime(), MAIN_CLASS)
- .applyIf(
- parameters.canUseJavaLangInvokeVarHandleStoreStoreFence(),
- rr -> rr.assertFailureWithErrorThatThrows(NullPointerException.class),
- rr -> rr.assertFailureWithErrorThatThrows(IllegalArgumentException.class));
+ .assertFailureWithErrorThatThrows(IllegalArgumentException.class);
}
@Test