From 0df455cb52fe71cdf3d500aae6fe05d158967d19 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Wed, 12 Feb 2020 14:07:39 +0100 Subject: [PATCH] Minor, remove duplicate test There's already a test that checks exactly this behavior at box/oldLanguageVersions/platformTypes/primitives/equalsNull_lv11.kt. --- .../primitives/equalsNull_withExplicitFlag.kt | 45 ------------------- .../codegen/BlackBoxCodegenTestGenerated.java | 5 --- .../LightAnalysisModeTestGenerated.java | 5 --- .../ir/FirBlackBoxCodegenTestGenerated.java | 5 --- .../ir/IrBlackBoxCodegenTestGenerated.java | 5 --- 5 files changed, 65 deletions(-) delete mode 100644 compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt diff --git a/compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt b/compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt deleted file mode 100644 index 8a5a423771e..00000000000 --- a/compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt +++ /dev/null @@ -1,45 +0,0 @@ -// IGNORE_BACKEND_FIR: JVM_IR -// KOTLIN_CONFIGURATION_FLAGS: +JVM.NO_EXCEPTION_ON_EXPLICIT_EQUALS_FOR_BOXED_NULL -// TARGET_BACKEND: JVM -// WITH_RUNTIME -// FILE: equalsNull_withExplicitFlag.kt - -// IGNORE_BACKEND: JVM_IR -// JVM_IR supports behavior since Kotlin 1.3, -// and '-Xno-exception-on-explicit-equals-for-boxed-null' is a fallback flag introduced in 1.2. - -import kotlin.test.* - -fun box(): String { - assertEquals(J.BOOL_NULL.equals(null), true) - assertEquals(J.CHAR_NULL.equals(null), true) - assertEquals(J.BYTE_NULL.equals(null), true) - assertEquals(J.SHORT_NULL.equals(null), true) - assertEquals(J.INT_NULL.equals(null), true) - assertEquals(J.LONG_NULL.equals(null), true) - assertEquals(J.FLOAT_NULL.equals(null), true) - assertEquals(J.DOUBLE_NULL.equals(null), true) - - assertEquals(J.BOOL_NULL == null, true) - assertEquals(J.CHAR_NULL == null, true) - assertEquals(J.BYTE_NULL == null, true) - assertEquals(J.SHORT_NULL == null, true) - assertEquals(J.INT_NULL == null, true) - assertEquals(J.LONG_NULL == null, true) - assertEquals(J.FLOAT_NULL == null, true) - assertEquals(J.DOUBLE_NULL == null, true) - - return "OK" -} - -// FILE: J.java -public class J { - public static Boolean BOOL_NULL = null; - public static Character CHAR_NULL = null; - public static Byte BYTE_NULL = null; - public static Short SHORT_NULL = null; - public static Integer INT_NULL = null; - public static Long LONG_NULL = null; - public static Float FLOAT_NULL = null; - public static Double DOUBLE_NULL = null; -} diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index dd499669645..3f2693abcbd 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -18738,11 +18738,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/platformTypes/primitives/equalsNull.kt"); } - @TestMetadata("equalsNull_withExplicitFlag.kt") - public void testEqualsNull_withExplicitFlag() throws Exception { - runTest("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt"); - } - @TestMetadata("hashCode.kt") public void testHashCode() throws Exception { runTest("compiler/testData/codegen/box/platformTypes/primitives/hashCode.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 0cc6543b123..402f4979589 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -18738,11 +18738,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/platformTypes/primitives/equalsNull.kt"); } - @TestMetadata("equalsNull_withExplicitFlag.kt") - public void testEqualsNull_withExplicitFlag() throws Exception { - runTest("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt"); - } - @TestMetadata("hashCode.kt") public void testHashCode() throws Exception { runTest("compiler/testData/codegen/box/platformTypes/primitives/hashCode.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java index e0ff174134f..305b3708bab 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java @@ -17242,11 +17242,6 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/platformTypes/primitives/equalsNull.kt"); } - @TestMetadata("equalsNull_withExplicitFlag.kt") - public void testEqualsNull_withExplicitFlag() throws Exception { - runTest("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt"); - } - @TestMetadata("hashCode.kt") public void testHashCode() throws Exception { runTest("compiler/testData/codegen/box/platformTypes/primitives/hashCode.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index 92fd43fc222..f80ef5b4761 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -17242,11 +17242,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/platformTypes/primitives/equalsNull.kt"); } - @TestMetadata("equalsNull_withExplicitFlag.kt") - public void testEqualsNull_withExplicitFlag() throws Exception { - runTest("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt"); - } - @TestMetadata("hashCode.kt") public void testHashCode() throws Exception { runTest("compiler/testData/codegen/box/platformTypes/primitives/hashCode.kt");