From 3e823d62a94c41255114102a4a3fb141b609b4da Mon Sep 17 00:00:00 2001 From: Ilya Matveev Date: Tue, 27 Jul 2021 14:12:44 +0700 Subject: [PATCH] [K/N][kotlin.test] Make GeneratedSuites public Issue #KT-47915 fixed --- .../kotlin/kotlin/native/internal/test/Launcher.kt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/Launcher.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/Launcher.kt index 22420b5141d..b3c43e92237 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/Launcher.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/Launcher.kt @@ -3,13 +3,21 @@ * that can be found in the LICENSE file. */ +@file:OptIn(ExperimentalStdlibApi::class) + package kotlin.native.internal.test import kotlin.system.exitProcess import kotlin.native.concurrent.* +// Advanced users may need an access to test suites generated by the compiler to integrate +// our test machinery with third party test runners (e.g. with xctestrun). +// So we keep this object public but protect it with @ExperimentalStdlibApi +// to stress that it is not a part of the stable API. +// Related YT issue: KT-47915. +@ExperimentalStdlibApi @ThreadLocal -private object GeneratedSuites { +public object GeneratedSuites { val suites = mutableListOf() fun add(suite: TestSuite) = suites.add(suite) }