From 80cf88c9b918a11fedf4e4871379f9373b6636e6 Mon Sep 17 00:00:00 2001 From: Vladimir Sukharev Date: Tue, 16 Jan 2024 19:31:48 +0100 Subject: [PATCH] [K/N][Tests] Move threadStates tests to common codegen/box folder ^KT-61259 --- ...LightTreeBlackBoxCodegenTestGenerated.java | 10 +++ ...hIrFakeOverrideGeneratorTestGenerated.java | 10 +++ .../FirPsiBlackBoxCodegenTestGenerated.java | 10 +++ .../box/cinterop}/threadStates/callback.kt | 4 +- .../threadStates/callbackOnSeparateThread.kt | 4 +- .../threadStates/callbackWithException.kt | 5 +- .../threadStates/callbackWithFinally.kt | 5 +- .../callbackWithFinallyNoCatch.kt | 4 +- .../threadStates/directStaticCFunctionCall.kt | 4 +- .../box/cinterop}/threadStates/nativeCall.kt | 4 +- .../nestedCallbackWithException.kt | 5 +- .../threadStates/nestedCallbackWithFinally.kt | 5 +- .../box/cinterop}/threadStates/nestedCalls.kt | 4 +- .../JvmAbiConsistencyTestBoxGenerated.java | 10 +++ .../codegen/BlackBoxCodegenTestGenerated.java | 10 +++ .../IrBlackBoxCodegenTestGenerated.java | 10 +++ ...kBoxCodegenWithIrInlinerTestGenerated.java | 10 +++ .../LightAnalysisModeTestGenerated.java | 13 ++++ .../fir/FirJsCodegenBoxTestGenerated.java | 10 +++ .../fir/FirJsES6CodegenBoxTestGenerated.java | 10 +++ .../test/ir/IrJsCodegenBoxTestGenerated.java | 10 +++ .../ir/IrJsES6CodegenBoxTestGenerated.java | 10 +++ .../FirNativeCodegenBoxTestGenerated.java | 73 ++++++++++++++++++ .../FirNativeCodegenBoxTestNoPLGenerated.java | 75 +++++++++++++++++++ .../FirNativeStandaloneTestGenerated.java | 75 ------------------- .../NativeCodegenBoxTestGenerated.java | 71 ++++++++++++++++++ .../NativeCodegenBoxTestNoPLGenerated.java | 73 ++++++++++++++++++ .../NativeStandaloneTestGenerated.java | 73 ------------------ .../test/FirWasmCodegenBoxTestGenerated.java | 10 +++ .../test/K1WasmCodegenBoxTestGenerated.java | 10 +++ 30 files changed, 465 insertions(+), 162 deletions(-) rename {native/native.tests/testData/standalone => compiler/testData/codegen/box/cinterop}/threadStates/callback.kt (95%) rename {native/native.tests/testData/standalone => compiler/testData/codegen/box/cinterop}/threadStates/callbackOnSeparateThread.kt (94%) rename {native/native.tests/testData/standalone => compiler/testData/codegen/box/cinterop}/threadStates/callbackWithException.kt (96%) rename {native/native.tests/testData/standalone => compiler/testData/codegen/box/cinterop}/threadStates/callbackWithFinally.kt (96%) rename {native/native.tests/testData/standalone => compiler/testData/codegen/box/cinterop}/threadStates/callbackWithFinallyNoCatch.kt (96%) rename {native/native.tests/testData/standalone => compiler/testData/codegen/box/cinterop}/threadStates/directStaticCFunctionCall.kt (92%) rename {native/native.tests/testData/standalone => compiler/testData/codegen/box/cinterop}/threadStates/nativeCall.kt (95%) rename {native/native.tests/testData/standalone => compiler/testData/codegen/box/cinterop}/threadStates/nestedCallbackWithException.kt (96%) rename {native/native.tests/testData/standalone => compiler/testData/codegen/box/cinterop}/threadStates/nestedCallbackWithFinally.kt (96%) rename {native/native.tests/testData/standalone => compiler/testData/codegen/box/cinterop}/threadStates/nestedCalls.kt (96%) diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java index 9a5aba2f88c..e0874eae568 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java @@ -6302,6 +6302,16 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/packages"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } } + + @Nested + @TestMetadata("compiler/testData/codegen/box/cinterop/threadStates") + @TestDataPath("$PROJECT_ROOT") + public class ThreadStates { + @Test + public void testAllFilesPresentInThreadStates() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/threadStates"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + } } @Nested diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java index 10d45d2032c..68e4dc5e108 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java @@ -6302,6 +6302,16 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/packages"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } } + + @Nested + @TestMetadata("compiler/testData/codegen/box/cinterop/threadStates") + @TestDataPath("$PROJECT_ROOT") + public class ThreadStates { + @Test + public void testAllFilesPresentInThreadStates() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/threadStates"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + } } @Nested diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java index a9c374380e5..d74f7f73ed1 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java @@ -6302,6 +6302,16 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/packages"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } } + + @Nested + @TestMetadata("compiler/testData/codegen/box/cinterop/threadStates") + @TestDataPath("$PROJECT_ROOT") + public class ThreadStates { + @Test + public void testAllFilesPresentInThreadStates() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/threadStates"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + } } @Nested diff --git a/native/native.tests/testData/standalone/threadStates/callback.kt b/compiler/testData/codegen/box/cinterop/threadStates/callback.kt similarity index 95% rename from native/native.tests/testData/standalone/threadStates/callback.kt rename to compiler/testData/codegen/box/cinterop/threadStates/callback.kt index 264853c6489..62d6f28dbf2 100644 --- a/native/native.tests/testData/standalone/threadStates/callback.kt +++ b/compiler/testData/codegen/box/cinterop/threadStates/callback.kt @@ -3,6 +3,7 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ // TARGET_BACKEND: NATIVE +// NATIVE_STANDALONE // FREE_COMPILER_ARGS: -opt-in=kotlin.native.internal.InternalForKotlinNative // MODULE: cinterop // FILE: threadStates.def @@ -39,11 +40,12 @@ import kotlin.test.* import kotlinx.cinterop.* import threadStates.* -fun main() { +fun box(): String { runCallback(staticCFunction { -> assertRunnableThreadState() }) assertRunnableThreadState() + return "OK" } fun assertRunnableThreadState() { diff --git a/native/native.tests/testData/standalone/threadStates/callbackOnSeparateThread.kt b/compiler/testData/codegen/box/cinterop/threadStates/callbackOnSeparateThread.kt similarity index 94% rename from native/native.tests/testData/standalone/threadStates/callbackOnSeparateThread.kt rename to compiler/testData/codegen/box/cinterop/threadStates/callbackOnSeparateThread.kt index d5e2bb40134..ad638763e4b 100644 --- a/native/native.tests/testData/standalone/threadStates/callbackOnSeparateThread.kt +++ b/compiler/testData/codegen/box/cinterop/threadStates/callbackOnSeparateThread.kt @@ -3,6 +3,7 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ // TARGET_BACKEND: NATIVE +// NATIVE_STANDALONE // FREE_COMPILER_ARGS: -opt-in=kotlin.native.internal.InternalForKotlinNative // MODULE: cinterop // FILE: threadStates.def @@ -29,10 +30,11 @@ import kotlin.test.* import kotlinx.cinterop.* import threadStates.* -fun main() { +fun box(): String { runInNewThread(staticCFunction { -> assertRunnableThreadState() }) + return "OK" } fun assertRunnableThreadState() { diff --git a/native/native.tests/testData/standalone/threadStates/callbackWithException.kt b/compiler/testData/codegen/box/cinterop/threadStates/callbackWithException.kt similarity index 96% rename from native/native.tests/testData/standalone/threadStates/callbackWithException.kt rename to compiler/testData/codegen/box/cinterop/threadStates/callbackWithException.kt index b3a456b057e..a3bd3d68cbf 100644 --- a/native/native.tests/testData/standalone/threadStates/callbackWithException.kt +++ b/compiler/testData/codegen/box/cinterop/threadStates/callbackWithException.kt @@ -3,6 +3,7 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ // TARGET_BACKEND: NATIVE +// NATIVE_STANDALONE // FREE_COMPILER_ARGS: -opt-in=kotlin.native.internal.InternalForKotlinNative // MODULE: cinterop // FILE: threadStates.def @@ -39,12 +40,12 @@ import kotlin.test.* import kotlinx.cinterop.staticCFunction import threadStates.* -fun main() { +fun box(): String { try { runCallback(staticCFunction(::throwException)) } catch (e: CustomException) { assertRunnableThreadState() - return + return "OK" } catch (e: Throwable) { assertRunnableThreadState() fail("Wrong exception type: ${e.message}") diff --git a/native/native.tests/testData/standalone/threadStates/callbackWithFinally.kt b/compiler/testData/codegen/box/cinterop/threadStates/callbackWithFinally.kt similarity index 96% rename from native/native.tests/testData/standalone/threadStates/callbackWithFinally.kt rename to compiler/testData/codegen/box/cinterop/threadStates/callbackWithFinally.kt index 773c519ca1f..48a445c3e8d 100644 --- a/native/native.tests/testData/standalone/threadStates/callbackWithFinally.kt +++ b/compiler/testData/codegen/box/cinterop/threadStates/callbackWithFinally.kt @@ -3,6 +3,7 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ // TARGET_BACKEND: NATIVE +// NATIVE_STANDALONE // FREE_COMPILER_ARGS: -opt-in=kotlin.native.internal.InternalForKotlinNative // MODULE: cinterop // FILE: threadStates.def @@ -39,12 +40,12 @@ import kotlin.test.* import kotlinx.cinterop.staticCFunction import threadStates.* -fun main() { +fun box(): String { try { runCallback(staticCFunction(::throwException)) } catch (e: CustomException) { assertRunnableThreadState() - return + return "OK" } finally { assertRunnableThreadState() } diff --git a/native/native.tests/testData/standalone/threadStates/callbackWithFinallyNoCatch.kt b/compiler/testData/codegen/box/cinterop/threadStates/callbackWithFinallyNoCatch.kt similarity index 96% rename from native/native.tests/testData/standalone/threadStates/callbackWithFinallyNoCatch.kt rename to compiler/testData/codegen/box/cinterop/threadStates/callbackWithFinallyNoCatch.kt index 34f376ef7e6..4c221e9781e 100644 --- a/native/native.tests/testData/standalone/threadStates/callbackWithFinallyNoCatch.kt +++ b/compiler/testData/codegen/box/cinterop/threadStates/callbackWithFinallyNoCatch.kt @@ -3,6 +3,7 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ // TARGET_BACKEND: NATIVE +// NATIVE_STANDALONE // FREE_COMPILER_ARGS: -opt-in=kotlin.native.internal.InternalForKotlinNative // MODULE: cinterop // FILE: threadStates.def @@ -39,7 +40,7 @@ import kotlin.test.* import kotlinx.cinterop.staticCFunction import threadStates.* -fun main() { +fun box(): String { try { try { runCallback(staticCFunction(::throwException)) @@ -48,6 +49,7 @@ fun main() { } assertRunnableThreadState() } catch (_: CustomException) {} + return "OK" } fun assertRunnableThreadState() { diff --git a/native/native.tests/testData/standalone/threadStates/directStaticCFunctionCall.kt b/compiler/testData/codegen/box/cinterop/threadStates/directStaticCFunctionCall.kt similarity index 92% rename from native/native.tests/testData/standalone/threadStates/directStaticCFunctionCall.kt rename to compiler/testData/codegen/box/cinterop/threadStates/directStaticCFunctionCall.kt index 0759cc946b2..8bd33aa792c 100644 --- a/native/native.tests/testData/standalone/threadStates/directStaticCFunctionCall.kt +++ b/compiler/testData/codegen/box/cinterop/threadStates/directStaticCFunctionCall.kt @@ -3,6 +3,7 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ // TARGET_BACKEND: NATIVE +// NATIVE_STANDALONE // FREE_COMPILER_ARGS: -opt-in=kotlin.native.internal.InternalForKotlinNative @file:OptIn(kotlin.native.runtime.NativeRuntimeApi::class, kotlinx.cinterop.ExperimentalForeignApi::class) @@ -10,13 +11,14 @@ import kotlin.native.runtime.Debugging import kotlin.test.* import kotlinx.cinterop.* -fun main() { +fun box(): String { val funPtr = staticCFunction { -> assertRunnableThreadState() } assertRunnableThreadState() funPtr() assertRunnableThreadState() + return "OK" } fun assertRunnableThreadState() { diff --git a/native/native.tests/testData/standalone/threadStates/nativeCall.kt b/compiler/testData/codegen/box/cinterop/threadStates/nativeCall.kt similarity index 95% rename from native/native.tests/testData/standalone/threadStates/nativeCall.kt rename to compiler/testData/codegen/box/cinterop/threadStates/nativeCall.kt index efa9b874276..847cea2b291 100644 --- a/native/native.tests/testData/standalone/threadStates/nativeCall.kt +++ b/compiler/testData/codegen/box/cinterop/threadStates/nativeCall.kt @@ -3,6 +3,7 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ // TARGET_BACKEND: NATIVE +// NATIVE_STANDALONE // FREE_COMPILER_ARGS: -opt-in=kotlin.native.internal.InternalForKotlinNative // MODULE: cinterop // FILE: threadStates.def @@ -40,9 +41,10 @@ import kotlin.test.* import kotlinx.cinterop.* import threadStates.* -fun main() { +fun box(): String { answer() assertRunnableThreadState() + return "OK" } fun assertRunnableThreadState() { diff --git a/native/native.tests/testData/standalone/threadStates/nestedCallbackWithException.kt b/compiler/testData/codegen/box/cinterop/threadStates/nestedCallbackWithException.kt similarity index 96% rename from native/native.tests/testData/standalone/threadStates/nestedCallbackWithException.kt rename to compiler/testData/codegen/box/cinterop/threadStates/nestedCallbackWithException.kt index 2251efeb201..e54fe8c91ef 100644 --- a/native/native.tests/testData/standalone/threadStates/nestedCallbackWithException.kt +++ b/compiler/testData/codegen/box/cinterop/threadStates/nestedCallbackWithException.kt @@ -3,6 +3,7 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ // TARGET_BACKEND: NATIVE +// NATIVE_STANDALONE // FREE_COMPILER_ARGS: -opt-in=kotlin.native.internal.InternalForKotlinNative // MODULE: cinterop // FILE: threadStates.def @@ -39,7 +40,7 @@ import kotlin.test.* import kotlinx.cinterop.staticCFunction import threadStates.* -fun main() { +fun box(): String { try { runCallback(staticCFunction { -> assertRunnableThreadState() @@ -47,7 +48,7 @@ fun main() { }) } catch (e: CustomException) { assertRunnableThreadState() - return + return "OK" } catch (e: Throwable) { assertRunnableThreadState() fail("Wrong exception type: ${e.message}") diff --git a/native/native.tests/testData/standalone/threadStates/nestedCallbackWithFinally.kt b/compiler/testData/codegen/box/cinterop/threadStates/nestedCallbackWithFinally.kt similarity index 96% rename from native/native.tests/testData/standalone/threadStates/nestedCallbackWithFinally.kt rename to compiler/testData/codegen/box/cinterop/threadStates/nestedCallbackWithFinally.kt index 8375857bcee..686f8634b0d 100644 --- a/native/native.tests/testData/standalone/threadStates/nestedCallbackWithFinally.kt +++ b/compiler/testData/codegen/box/cinterop/threadStates/nestedCallbackWithFinally.kt @@ -3,6 +3,7 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ // TARGET_BACKEND: NATIVE +// NATIVE_STANDALONE // FREE_COMPILER_ARGS: -opt-in=kotlin.native.internal.InternalForKotlinNative // MODULE: cinterop // FILE: threadStates.def @@ -39,7 +40,7 @@ import kotlin.test.* import kotlinx.cinterop.staticCFunction import threadStates.* -fun main() { +fun box(): String { try { runCallback(staticCFunction { -> assertRunnableThreadState() @@ -47,7 +48,7 @@ fun main() { }) } catch (e: CustomException) { assertRunnableThreadState() - return + return "OK" } finally { assertRunnableThreadState() } diff --git a/native/native.tests/testData/standalone/threadStates/nestedCalls.kt b/compiler/testData/codegen/box/cinterop/threadStates/nestedCalls.kt similarity index 96% rename from native/native.tests/testData/standalone/threadStates/nestedCalls.kt rename to compiler/testData/codegen/box/cinterop/threadStates/nestedCalls.kt index d8bc9c8ba7b..14a5b5c758d 100644 --- a/native/native.tests/testData/standalone/threadStates/nestedCalls.kt +++ b/compiler/testData/codegen/box/cinterop/threadStates/nestedCalls.kt @@ -3,6 +3,7 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ // TARGET_BACKEND: NATIVE +// NATIVE_STANDALONE // FREE_COMPILER_ARGS: -opt-in=kotlin.native.internal.InternalForKotlinNative // MODULE: cinterop // FILE: threadStates.def @@ -46,13 +47,14 @@ import kotlin.test.* import kotlinx.cinterop.* import threadStates.* -fun main() { +fun box(): String { runCallback(staticCFunction { -> assertRunnableThreadState() answer() Unit }) assertRunnableThreadState() + return "OK" } fun assertRunnableThreadState() { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java index 415020ad2db..1c16faf44e2 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java @@ -6302,6 +6302,16 @@ public class JvmAbiConsistencyTestBoxGenerated extends AbstractJvmAbiConsistency KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/packages"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } } + + @Nested + @TestMetadata("compiler/testData/codegen/box/cinterop/threadStates") + @TestDataPath("$PROJECT_ROOT") + public class ThreadStates { + @Test + public void testAllFilesPresentInThreadStates() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/threadStates"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + } } @Nested diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index 99a14998b3e..fa8cd523a08 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -6068,6 +6068,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/packages"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } } + + @Nested + @TestMetadata("compiler/testData/codegen/box/cinterop/threadStates") + @TestDataPath("$PROJECT_ROOT") + public class ThreadStates { + @Test + public void testAllFilesPresentInThreadStates() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/threadStates"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + } } @Nested diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index 37fd07ec48c..01c728bd874 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -6302,6 +6302,16 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/packages"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } } + + @Nested + @TestMetadata("compiler/testData/codegen/box/cinterop/threadStates") + @TestDataPath("$PROJECT_ROOT") + public class ThreadStates { + @Test + public void testAllFilesPresentInThreadStates() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/threadStates"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + } } @Nested diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java index 7ecc01e8dc9..34328dff539 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java @@ -6302,6 +6302,16 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/packages"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } } + + @Nested + @TestMetadata("compiler/testData/codegen/box/cinterop/threadStates") + @TestDataPath("$PROJECT_ROOT") + public class ThreadStates { + @Test + public void testAllFilesPresentInThreadStates() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/threadStates"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + } } @Nested diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index ed18856007a..377d9c3a41d 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -5522,6 +5522,19 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/packages"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } } + + @TestMetadata("compiler/testData/codegen/box/cinterop/threadStates") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ThreadStates extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInThreadStates() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/threadStates"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + } } @TestMetadata("compiler/testData/codegen/box/classLiteral") 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 8a8a6fa2c31..18baa18b6ae 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 @@ -4640,6 +4640,16 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/packages"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } } + + @Nested + @TestMetadata("compiler/testData/codegen/box/cinterop/threadStates") + @TestDataPath("$PROJECT_ROOT") + public class ThreadStates { + @Test + public void testAllFilesPresentInThreadStates() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/threadStates"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } } @Nested diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java index 6f376574cf7..f506e843c99 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java @@ -4640,6 +4640,16 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/packages"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); } } + + @Nested + @TestMetadata("compiler/testData/codegen/box/cinterop/threadStates") + @TestDataPath("$PROJECT_ROOT") + public class ThreadStates { + @Test + public void testAllFilesPresentInThreadStates() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/threadStates"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } } @Nested 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 92ff50e7608..7d518c0ebc9 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 @@ -4640,6 +4640,16 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/packages"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } } + + @Nested + @TestMetadata("compiler/testData/codegen/box/cinterop/threadStates") + @TestDataPath("$PROJECT_ROOT") + public class ThreadStates { + @Test + public void testAllFilesPresentInThreadStates() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/threadStates"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } } @Nested 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 2f29ffe2157..5e506a36a71 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 @@ -4640,6 +4640,16 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/packages"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); } } + + @Nested + @TestMetadata("compiler/testData/codegen/box/cinterop/threadStates") + @TestDataPath("$PROJECT_ROOT") + public class ThreadStates { + @Test + public void testAllFilesPresentInThreadStates() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/threadStates"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } } @Nested diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java index e0c83893935..0f8f394cbb8 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java @@ -5092,6 +5092,79 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe runTest("compiler/testData/codegen/box/cinterop/packages/root.kt"); } } + + @Nested + @TestMetadata("compiler/testData/codegen/box/cinterop/threadStates") + @TestDataPath("$PROJECT_ROOT") + @Tag("frontend-fir") + @FirPipeline() + @UseExtTestCaseGroupProvider() + public class ThreadStates { + @Test + public void testAllFilesPresentInThreadStates() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/threadStates"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Test + @TestMetadata("callback.kt") + public void testCallback() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/callback.kt"); + } + + @Test + @TestMetadata("callbackOnSeparateThread.kt") + public void testCallbackOnSeparateThread() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/callbackOnSeparateThread.kt"); + } + + @Test + @TestMetadata("callbackWithException.kt") + public void testCallbackWithException() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/callbackWithException.kt"); + } + + @Test + @TestMetadata("callbackWithFinally.kt") + public void testCallbackWithFinally() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/callbackWithFinally.kt"); + } + + @Test + @TestMetadata("callbackWithFinallyNoCatch.kt") + public void testCallbackWithFinallyNoCatch() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/callbackWithFinallyNoCatch.kt"); + } + + @Test + @TestMetadata("directStaticCFunctionCall.kt") + public void testDirectStaticCFunctionCall() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/directStaticCFunctionCall.kt"); + } + + @Test + @TestMetadata("nativeCall.kt") + public void testNativeCall() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/nativeCall.kt"); + } + + @Test + @TestMetadata("nestedCallbackWithException.kt") + public void testNestedCallbackWithException() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/nestedCallbackWithException.kt"); + } + + @Test + @TestMetadata("nestedCallbackWithFinally.kt") + public void testNestedCallbackWithFinally() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/nestedCallbackWithFinally.kt"); + } + + @Test + @TestMetadata("nestedCalls.kt") + public void testNestedCalls() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/nestedCalls.kt"); + } + } } @Nested diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java index e0de10cce8d..a99d74c259e 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java @@ -5208,6 +5208,81 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB runTest("compiler/testData/codegen/box/cinterop/packages/root.kt"); } } + + @Nested + @TestMetadata("compiler/testData/codegen/box/cinterop/threadStates") + @TestDataPath("$PROJECT_ROOT") + @Tag("frontend-fir") + @FirPipeline() + @UseExtTestCaseGroupProvider() + @UsePartialLinkage(mode = Mode.DISABLED) + @Tag("no-partial-linkage-may-be-skipped") + public class ThreadStates { + @Test + public void testAllFilesPresentInThreadStates() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/threadStates"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Test + @TestMetadata("callback.kt") + public void testCallback() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/callback.kt"); + } + + @Test + @TestMetadata("callbackOnSeparateThread.kt") + public void testCallbackOnSeparateThread() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/callbackOnSeparateThread.kt"); + } + + @Test + @TestMetadata("callbackWithException.kt") + public void testCallbackWithException() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/callbackWithException.kt"); + } + + @Test + @TestMetadata("callbackWithFinally.kt") + public void testCallbackWithFinally() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/callbackWithFinally.kt"); + } + + @Test + @TestMetadata("callbackWithFinallyNoCatch.kt") + public void testCallbackWithFinallyNoCatch() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/callbackWithFinallyNoCatch.kt"); + } + + @Test + @TestMetadata("directStaticCFunctionCall.kt") + public void testDirectStaticCFunctionCall() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/directStaticCFunctionCall.kt"); + } + + @Test + @TestMetadata("nativeCall.kt") + public void testNativeCall() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/nativeCall.kt"); + } + + @Test + @TestMetadata("nestedCallbackWithException.kt") + public void testNestedCallbackWithException() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/nestedCallbackWithException.kt"); + } + + @Test + @TestMetadata("nestedCallbackWithFinally.kt") + public void testNestedCallbackWithFinally() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/nestedCallbackWithFinally.kt"); + } + + @Test + @TestMetadata("nestedCalls.kt") + public void testNestedCalls() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/nestedCalls.kt"); + } + } } @Nested diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeStandaloneTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeStandaloneTestGenerated.java index f71a073484c..8d1b42a896e 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeStandaloneTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeStandaloneTestGenerated.java @@ -258,79 +258,4 @@ public class FirNativeStandaloneTestGenerated extends AbstractNativeBlackBoxTest runTest("native/native.tests/testData/standalone/termination/unhandledExceptionInForeignThread.kt"); } } - - @Nested - @TestMetadata("native/native.tests/testData/standalone/threadStates") - @TestDataPath("$PROJECT_ROOT") - @Tag("standalone") - @EnforcedProperty(property = ClassLevelProperty.TEST_KIND, propertyValue = "STANDALONE_NO_TR") - @UseStandardTestCaseGroupProvider() - @Tag("frontend-fir") - @FirPipeline() - public class ThreadStates { - @Test - public void testAllFilesPresentInThreadStates() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/standalone/threadStates"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @Test - @TestMetadata("callback.kt") - public void testCallback() throws Exception { - runTest("native/native.tests/testData/standalone/threadStates/callback.kt"); - } - - @Test - @TestMetadata("callbackOnSeparateThread.kt") - public void testCallbackOnSeparateThread() throws Exception { - runTest("native/native.tests/testData/standalone/threadStates/callbackOnSeparateThread.kt"); - } - - @Test - @TestMetadata("callbackWithException.kt") - public void testCallbackWithException() throws Exception { - runTest("native/native.tests/testData/standalone/threadStates/callbackWithException.kt"); - } - - @Test - @TestMetadata("callbackWithFinally.kt") - public void testCallbackWithFinally() throws Exception { - runTest("native/native.tests/testData/standalone/threadStates/callbackWithFinally.kt"); - } - - @Test - @TestMetadata("callbackWithFinallyNoCatch.kt") - public void testCallbackWithFinallyNoCatch() throws Exception { - runTest("native/native.tests/testData/standalone/threadStates/callbackWithFinallyNoCatch.kt"); - } - - @Test - @TestMetadata("directStaticCFunctionCall.kt") - public void testDirectStaticCFunctionCall() throws Exception { - runTest("native/native.tests/testData/standalone/threadStates/directStaticCFunctionCall.kt"); - } - - @Test - @TestMetadata("nativeCall.kt") - public void testNativeCall() throws Exception { - runTest("native/native.tests/testData/standalone/threadStates/nativeCall.kt"); - } - - @Test - @TestMetadata("nestedCallbackWithException.kt") - public void testNestedCallbackWithException() throws Exception { - runTest("native/native.tests/testData/standalone/threadStates/nestedCallbackWithException.kt"); - } - - @Test - @TestMetadata("nestedCallbackWithFinally.kt") - public void testNestedCallbackWithFinally() throws Exception { - runTest("native/native.tests/testData/standalone/threadStates/nestedCallbackWithFinally.kt"); - } - - @Test - @TestMetadata("nestedCalls.kt") - public void testNestedCalls() throws Exception { - runTest("native/native.tests/testData/standalone/threadStates/nestedCalls.kt"); - } - } } diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java index 37d79331a76..43bc1f5ac27 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java @@ -4976,6 +4976,77 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/cinterop/packages/root.kt"); } } + + @Nested + @TestMetadata("compiler/testData/codegen/box/cinterop/threadStates") + @TestDataPath("$PROJECT_ROOT") + @UseExtTestCaseGroupProvider() + public class ThreadStates { + @Test + public void testAllFilesPresentInThreadStates() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/threadStates"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Test + @TestMetadata("callback.kt") + public void testCallback() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/callback.kt"); + } + + @Test + @TestMetadata("callbackOnSeparateThread.kt") + public void testCallbackOnSeparateThread() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/callbackOnSeparateThread.kt"); + } + + @Test + @TestMetadata("callbackWithException.kt") + public void testCallbackWithException() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/callbackWithException.kt"); + } + + @Test + @TestMetadata("callbackWithFinally.kt") + public void testCallbackWithFinally() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/callbackWithFinally.kt"); + } + + @Test + @TestMetadata("callbackWithFinallyNoCatch.kt") + public void testCallbackWithFinallyNoCatch() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/callbackWithFinallyNoCatch.kt"); + } + + @Test + @TestMetadata("directStaticCFunctionCall.kt") + public void testDirectStaticCFunctionCall() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/directStaticCFunctionCall.kt"); + } + + @Test + @TestMetadata("nativeCall.kt") + public void testNativeCall() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/nativeCall.kt"); + } + + @Test + @TestMetadata("nestedCallbackWithException.kt") + public void testNestedCallbackWithException() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/nestedCallbackWithException.kt"); + } + + @Test + @TestMetadata("nestedCallbackWithFinally.kt") + public void testNestedCallbackWithFinally() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/nestedCallbackWithFinally.kt"); + } + + @Test + @TestMetadata("nestedCalls.kt") + public void testNestedCalls() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/nestedCalls.kt"); + } + } } @Nested diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java index 7de64cc758c..ce030f30245 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java @@ -5093,6 +5093,79 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT runTest("compiler/testData/codegen/box/cinterop/packages/root.kt"); } } + + @Nested + @TestMetadata("compiler/testData/codegen/box/cinterop/threadStates") + @TestDataPath("$PROJECT_ROOT") + @UseExtTestCaseGroupProvider() + @UsePartialLinkage(mode = Mode.DISABLED) + @Tag("no-partial-linkage-may-be-skipped") + public class ThreadStates { + @Test + public void testAllFilesPresentInThreadStates() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/threadStates"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Test + @TestMetadata("callback.kt") + public void testCallback() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/callback.kt"); + } + + @Test + @TestMetadata("callbackOnSeparateThread.kt") + public void testCallbackOnSeparateThread() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/callbackOnSeparateThread.kt"); + } + + @Test + @TestMetadata("callbackWithException.kt") + public void testCallbackWithException() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/callbackWithException.kt"); + } + + @Test + @TestMetadata("callbackWithFinally.kt") + public void testCallbackWithFinally() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/callbackWithFinally.kt"); + } + + @Test + @TestMetadata("callbackWithFinallyNoCatch.kt") + public void testCallbackWithFinallyNoCatch() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/callbackWithFinallyNoCatch.kt"); + } + + @Test + @TestMetadata("directStaticCFunctionCall.kt") + public void testDirectStaticCFunctionCall() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/directStaticCFunctionCall.kt"); + } + + @Test + @TestMetadata("nativeCall.kt") + public void testNativeCall() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/nativeCall.kt"); + } + + @Test + @TestMetadata("nestedCallbackWithException.kt") + public void testNestedCallbackWithException() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/nestedCallbackWithException.kt"); + } + + @Test + @TestMetadata("nestedCallbackWithFinally.kt") + public void testNestedCallbackWithFinally() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/nestedCallbackWithFinally.kt"); + } + + @Test + @TestMetadata("nestedCalls.kt") + public void testNestedCalls() throws Exception { + runTest("compiler/testData/codegen/box/cinterop/threadStates/nestedCalls.kt"); + } + } } @Nested diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeStandaloneTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeStandaloneTestGenerated.java index feaba454c1c..eebac7bfd7e 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeStandaloneTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeStandaloneTestGenerated.java @@ -249,77 +249,4 @@ public class NativeStandaloneTestGenerated extends AbstractNativeBlackBoxTest { runTest("native/native.tests/testData/standalone/termination/unhandledExceptionInForeignThread.kt"); } } - - @Nested - @TestMetadata("native/native.tests/testData/standalone/threadStates") - @TestDataPath("$PROJECT_ROOT") - @Tag("standalone") - @EnforcedProperty(property = ClassLevelProperty.TEST_KIND, propertyValue = "STANDALONE_NO_TR") - @UseStandardTestCaseGroupProvider() - public class ThreadStates { - @Test - public void testAllFilesPresentInThreadStates() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/standalone/threadStates"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @Test - @TestMetadata("callback.kt") - public void testCallback() throws Exception { - runTest("native/native.tests/testData/standalone/threadStates/callback.kt"); - } - - @Test - @TestMetadata("callbackOnSeparateThread.kt") - public void testCallbackOnSeparateThread() throws Exception { - runTest("native/native.tests/testData/standalone/threadStates/callbackOnSeparateThread.kt"); - } - - @Test - @TestMetadata("callbackWithException.kt") - public void testCallbackWithException() throws Exception { - runTest("native/native.tests/testData/standalone/threadStates/callbackWithException.kt"); - } - - @Test - @TestMetadata("callbackWithFinally.kt") - public void testCallbackWithFinally() throws Exception { - runTest("native/native.tests/testData/standalone/threadStates/callbackWithFinally.kt"); - } - - @Test - @TestMetadata("callbackWithFinallyNoCatch.kt") - public void testCallbackWithFinallyNoCatch() throws Exception { - runTest("native/native.tests/testData/standalone/threadStates/callbackWithFinallyNoCatch.kt"); - } - - @Test - @TestMetadata("directStaticCFunctionCall.kt") - public void testDirectStaticCFunctionCall() throws Exception { - runTest("native/native.tests/testData/standalone/threadStates/directStaticCFunctionCall.kt"); - } - - @Test - @TestMetadata("nativeCall.kt") - public void testNativeCall() throws Exception { - runTest("native/native.tests/testData/standalone/threadStates/nativeCall.kt"); - } - - @Test - @TestMetadata("nestedCallbackWithException.kt") - public void testNestedCallbackWithException() throws Exception { - runTest("native/native.tests/testData/standalone/threadStates/nestedCallbackWithException.kt"); - } - - @Test - @TestMetadata("nestedCallbackWithFinally.kt") - public void testNestedCallbackWithFinally() throws Exception { - runTest("native/native.tests/testData/standalone/threadStates/nestedCallbackWithFinally.kt"); - } - - @Test - @TestMetadata("nestedCalls.kt") - public void testNestedCalls() throws Exception { - runTest("native/native.tests/testData/standalone/threadStates/nestedCalls.kt"); - } - } } diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java index 28b51f6312e..91bdc2e5a2d 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java @@ -4622,6 +4622,16 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/packages"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } } + + @Nested + @TestMetadata("compiler/testData/codegen/box/cinterop/threadStates") + @TestDataPath("$PROJECT_ROOT") + public class ThreadStates { + @Test + public void testAllFilesPresentInThreadStates() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/threadStates"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + } } @Nested diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java index df825e683d5..9552cb0851f 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java @@ -4622,6 +4622,16 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/packages"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } } + + @Nested + @TestMetadata("compiler/testData/codegen/box/cinterop/threadStates") + @TestDataPath("$PROJECT_ROOT") + public class ThreadStates { + @Test + public void testAllFilesPresentInThreadStates() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/cinterop/threadStates"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + } } @Nested