From 1bf3bde4f8f8890a3827f5895f0cd661a51291ab Mon Sep 17 00:00:00 2001 From: Vladimir Sukharev Date: Thu, 22 Jun 2023 18:39:59 +0000 Subject: [PATCH] [Test] Convert IGNORE: NATIVE directives in box tests from J to J ^KT-59057 Merge-request: KT-MR-10749 Merged-by: Vladimir Sukharev --- .../objectMethods/cloneCallsConstructor.kt | 8 ++--- .../objectMethods/cloneCallsSuper.kt | 8 ++--- .../cloneCallsSuperAndModifies.kt | 8 ++--- .../cloneableClassWithoutClone.kt | 8 ++--- compiler/testData/codegen/box/jdk/kt1397.kt | 2 +- .../fir/FirJsCodegenBoxTestGenerated.java | 24 --------------- .../test/ir/IrJsCodegenBoxTestGenerated.java | 24 --------------- .../ir/IrJsES6CodegenBoxTestGenerated.java | 24 --------------- .../FirNativeCodegenBoxTestGenerated.java | 30 ------------------- .../FirNativeCodegenBoxTestNoPLGenerated.java | 30 ------------------- .../NativeCodegenBoxTestGenerated.java | 30 ------------------- .../NativeCodegenBoxTestNoPLGenerated.java | 30 ------------------- .../test/IrCodegenBoxWasmTestGenerated.java | 20 ------------- 13 files changed, 9 insertions(+), 237 deletions(-) diff --git a/compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsConstructor.kt b/compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsConstructor.kt index d026d6fe433..243ab54388f 100644 --- a/compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsConstructor.kt +++ b/compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsConstructor.kt @@ -1,9 +1,5 @@ -// IGNORE_BACKEND: WASM -// WASM_MUTE_REASON: IGNORED_IN_JS -// IGNORE_BACKEND: JS_IR -// IGNORE_BACKEND: JS_IR_ES6 -// TODO: muted automatically, investigate should it be ran for JS or not -// IGNORE_BACKEND: JS, NATIVE +// TARGET_BACKEND: JVM +// TARGET_BACKEND: JVM_IR data class A(var x: Int) : Cloneable { public override fun clone(): A = A(x) diff --git a/compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuper.kt b/compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuper.kt index 84ea5c7ce7a..6dffb8c8ef4 100644 --- a/compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuper.kt +++ b/compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuper.kt @@ -1,9 +1,5 @@ -// IGNORE_BACKEND: WASM -// WASM_MUTE_REASON: IGNORED_IN_JS -// IGNORE_BACKEND: JS_IR -// IGNORE_BACKEND: JS_IR_ES6 -// TODO: muted automatically, investigate should it be ran for JS or not -// IGNORE_BACKEND: JS, NATIVE +// TARGET_BACKEND: JVM +// TARGET_BACKEND: JVM_IR data class A(var x: Int) : Cloneable { public override fun clone(): A = super.clone() as A diff --git a/compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuperAndModifies.kt b/compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuperAndModifies.kt index 40ccbef6e9f..785c81238ff 100644 --- a/compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuperAndModifies.kt +++ b/compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuperAndModifies.kt @@ -1,9 +1,5 @@ -// IGNORE_BACKEND: WASM -// WASM_MUTE_REASON: IGNORED_IN_JS -// IGNORE_BACKEND: JS_IR -// IGNORE_BACKEND: JS_IR_ES6 -// TODO: muted automatically, investigate should it be ran for JS or not -// IGNORE_BACKEND: JS, NATIVE +// TARGET_BACKEND: JVM +// TARGET_BACKEND: JVM_IR data class A(var x: Int) : Cloneable { public override fun clone(): A { diff --git a/compiler/testData/codegen/box/javaInterop/objectMethods/cloneableClassWithoutClone.kt b/compiler/testData/codegen/box/javaInterop/objectMethods/cloneableClassWithoutClone.kt index 36270606ed7..8b393227ee9 100644 --- a/compiler/testData/codegen/box/javaInterop/objectMethods/cloneableClassWithoutClone.kt +++ b/compiler/testData/codegen/box/javaInterop/objectMethods/cloneableClassWithoutClone.kt @@ -1,9 +1,5 @@ -// IGNORE_BACKEND: WASM -// WASM_MUTE_REASON: IGNORED_IN_JS -// IGNORE_BACKEND: JS_IR -// IGNORE_BACKEND: JS_IR_ES6 -// TODO: muted automatically, investigate should it be ran for JS or not -// IGNORE_BACKEND: JS, NATIVE +// TARGET_BACKEND: JVM +// TARGET_BACKEND: JVM_IR data class A(val s: String) : Cloneable { fun externalClone(): A = clone() as A diff --git a/compiler/testData/codegen/box/jdk/kt1397.kt b/compiler/testData/codegen/box/jdk/kt1397.kt index 11d2fd89651..4604310ae17 100644 --- a/compiler/testData/codegen/box/jdk/kt1397.kt +++ b/compiler/testData/codegen/box/jdk/kt1397.kt @@ -1,7 +1,7 @@ // IGNORE_BACKEND: WASM // WASM_MUTE_REASON: STDLIB_COLLECTION_INHERITANCE // KJS_WITH_FULL_RUNTIME -// IGNORE_BACKEND: NATIVE +// DONT_TARGET_EXACT_BACKEND: NATIVE class IntArrayList(): ArrayList() { override fun get(index: Int): Int = super.get(index) diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java index 6b7f973b5d5..92fc48a885a 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java @@ -21717,30 +21717,6 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { public void testAllFilesPresentInObjectMethods() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/objectMethods"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } - - @Test - @TestMetadata("cloneCallsConstructor.kt") - public void testCloneCallsConstructor() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsConstructor.kt"); - } - - @Test - @TestMetadata("cloneCallsSuper.kt") - public void testCloneCallsSuper() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuper.kt"); - } - - @Test - @TestMetadata("cloneCallsSuperAndModifies.kt") - public void testCloneCallsSuperAndModifies() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuperAndModifies.kt"); - } - - @Test - @TestMetadata("cloneableClassWithoutClone.kt") - public void testCloneableClassWithoutClone() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneableClassWithoutClone.kt"); - } } } diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java index bd7512886ac..85393eb9b3c 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java @@ -21717,30 +21717,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { public void testAllFilesPresentInObjectMethods() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/objectMethods"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } - - @Test - @TestMetadata("cloneCallsConstructor.kt") - public void testCloneCallsConstructor() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsConstructor.kt"); - } - - @Test - @TestMetadata("cloneCallsSuper.kt") - public void testCloneCallsSuper() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuper.kt"); - } - - @Test - @TestMetadata("cloneCallsSuperAndModifies.kt") - public void testCloneCallsSuperAndModifies() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuperAndModifies.kt"); - } - - @Test - @TestMetadata("cloneableClassWithoutClone.kt") - public void testCloneableClassWithoutClone() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneableClassWithoutClone.kt"); - } } } diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java index ff747b543e7..cd857a22d65 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java @@ -21717,30 +21717,6 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes public void testAllFilesPresentInObjectMethods() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/objectMethods"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); } - - @Test - @TestMetadata("cloneCallsConstructor.kt") - public void testCloneCallsConstructor() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsConstructor.kt"); - } - - @Test - @TestMetadata("cloneCallsSuper.kt") - public void testCloneCallsSuper() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuper.kt"); - } - - @Test - @TestMetadata("cloneCallsSuperAndModifies.kt") - public void testCloneCallsSuperAndModifies() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuperAndModifies.kt"); - } - - @Test - @TestMetadata("cloneableClassWithoutClone.kt") - public void testCloneableClassWithoutClone() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneableClassWithoutClone.kt"); - } } } diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java index de570cbf104..216a9ba87a9 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java @@ -24585,30 +24585,6 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe public void testAllFilesPresentInObjectMethods() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/objectMethods"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } - - @Test - @TestMetadata("cloneCallsConstructor.kt") - public void testCloneCallsConstructor() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsConstructor.kt"); - } - - @Test - @TestMetadata("cloneCallsSuper.kt") - public void testCloneCallsSuper() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuper.kt"); - } - - @Test - @TestMetadata("cloneCallsSuperAndModifies.kt") - public void testCloneCallsSuperAndModifies() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuperAndModifies.kt"); - } - - @Test - @TestMetadata("cloneableClassWithoutClone.kt") - public void testCloneableClassWithoutClone() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneableClassWithoutClone.kt"); - } } } @@ -24694,12 +24670,6 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe runTest("compiler/testData/codegen/box/jdk/iteratingOverHashMap.kt"); } - @Test - @TestMetadata("kt1397.kt") - public void testKt1397() throws Exception { - runTest("compiler/testData/codegen/box/jdk/kt1397.kt"); - } - @Test @TestMetadata("noStringToCharArray.kt") public void testNoStringToCharArray() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java index 8c686952fb4..85fa373fdf3 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java @@ -25083,30 +25083,6 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB public void testAllFilesPresentInObjectMethods() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/objectMethods"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } - - @Test - @TestMetadata("cloneCallsConstructor.kt") - public void testCloneCallsConstructor() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsConstructor.kt"); - } - - @Test - @TestMetadata("cloneCallsSuper.kt") - public void testCloneCallsSuper() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuper.kt"); - } - - @Test - @TestMetadata("cloneCallsSuperAndModifies.kt") - public void testCloneCallsSuperAndModifies() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuperAndModifies.kt"); - } - - @Test - @TestMetadata("cloneableClassWithoutClone.kt") - public void testCloneableClassWithoutClone() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneableClassWithoutClone.kt"); - } } } @@ -25202,12 +25178,6 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB runTest("compiler/testData/codegen/box/jdk/iteratingOverHashMap.kt"); } - @Test - @TestMetadata("kt1397.kt") - public void testKt1397() throws Exception { - runTest("compiler/testData/codegen/box/jdk/kt1397.kt"); - } - @Test @TestMetadata("noStringToCharArray.kt") public void testNoStringToCharArray() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java index 645fa32e7c9..926dd347365 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java @@ -24337,30 +24337,6 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest public void testAllFilesPresentInObjectMethods() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/objectMethods"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } - - @Test - @TestMetadata("cloneCallsConstructor.kt") - public void testCloneCallsConstructor() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsConstructor.kt"); - } - - @Test - @TestMetadata("cloneCallsSuper.kt") - public void testCloneCallsSuper() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuper.kt"); - } - - @Test - @TestMetadata("cloneCallsSuperAndModifies.kt") - public void testCloneCallsSuperAndModifies() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuperAndModifies.kt"); - } - - @Test - @TestMetadata("cloneableClassWithoutClone.kt") - public void testCloneableClassWithoutClone() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneableClassWithoutClone.kt"); - } } } @@ -24441,12 +24417,6 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/jdk/iteratingOverHashMap.kt"); } - @Test - @TestMetadata("kt1397.kt") - public void testKt1397() throws Exception { - runTest("compiler/testData/codegen/box/jdk/kt1397.kt"); - } - @Test @TestMetadata("noStringToCharArray.kt") public void testNoStringToCharArray() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java index 68fb4edbd8e..da931420513 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java @@ -24586,30 +24586,6 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT public void testAllFilesPresentInObjectMethods() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/objectMethods"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } - - @Test - @TestMetadata("cloneCallsConstructor.kt") - public void testCloneCallsConstructor() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsConstructor.kt"); - } - - @Test - @TestMetadata("cloneCallsSuper.kt") - public void testCloneCallsSuper() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuper.kt"); - } - - @Test - @TestMetadata("cloneCallsSuperAndModifies.kt") - public void testCloneCallsSuperAndModifies() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuperAndModifies.kt"); - } - - @Test - @TestMetadata("cloneableClassWithoutClone.kt") - public void testCloneableClassWithoutClone() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneableClassWithoutClone.kt"); - } } } @@ -24695,12 +24671,6 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT runTest("compiler/testData/codegen/box/jdk/iteratingOverHashMap.kt"); } - @Test - @TestMetadata("kt1397.kt") - public void testKt1397() throws Exception { - runTest("compiler/testData/codegen/box/jdk/kt1397.kt"); - } - @Test @TestMetadata("noStringToCharArray.kt") public void testNoStringToCharArray() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java index 98537ce6837..af17d0d8270 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java @@ -19156,26 +19156,6 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest public void testAllFilesPresentInObjectMethods() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/objectMethods"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } - - @TestMetadata("cloneCallsConstructor.kt") - public void testCloneCallsConstructor() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsConstructor.kt"); - } - - @TestMetadata("cloneCallsSuper.kt") - public void testCloneCallsSuper() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuper.kt"); - } - - @TestMetadata("cloneCallsSuperAndModifies.kt") - public void testCloneCallsSuperAndModifies() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuperAndModifies.kt"); - } - - @TestMetadata("cloneableClassWithoutClone.kt") - public void testCloneableClassWithoutClone() throws Exception { - runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneableClassWithoutClone.kt"); - } } }