diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/TestProcessor.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/TestProcessor.kt index bff67588adf..a51eb372e11 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/TestProcessor.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/TestProcessor.kt @@ -137,8 +137,8 @@ internal class TestProcessor (val context: KonanBackendContext) { override val runtimeKindName: Name get() = throw NotImplementedError() }, - BEFORE_EACH("kotlin.test.BeforeEach", "BEFORE_EACH"), - AFTER_EACH("kotlin.test.AfterEach", "AFTER_EACH"), + BEFORE_TEST("kotlin.test.BeforeTest", "BEFORE_TEST"), + AFTER_TEST("kotlin.test.AfterTest", "AFTER_TEST"), BEFORE_CLASS("kotlin.test.BeforeClass", "BEFORE_CLASS"), AFTER_CLASS("kotlin.test.AfterClass", "AFTER_CLASS"); @@ -146,7 +146,7 @@ internal class TestProcessor (val context: KonanBackendContext) { open val runtimeKindName = Name.identifier(runtimeKindString) companion object { - val INSTANCE_KINDS = listOf(TEST, BEFORE_EACH, AFTER_EACH) + val INSTANCE_KINDS = listOf(TEST, BEFORE_TEST, AFTER_TEST) val COMPANION_KINDS = listOf(BEFORE_CLASS, AFTER_CLASS) } } diff --git a/runtime/src/main/kotlin/kotlin/native/internal/test/TestSuite.kt b/runtime/src/main/kotlin/kotlin/native/internal/test/TestSuite.kt index 0c406390f42..9934828e64c 100644 --- a/runtime/src/main/kotlin/kotlin/native/internal/test/TestSuite.kt +++ b/runtime/src/main/kotlin/kotlin/native/internal/test/TestSuite.kt @@ -30,8 +30,8 @@ public interface TestSuite { } public enum class TestFunctionKind { - BEFORE_EACH, - AFTER_EACH, + BEFORE_TEST, + AFTER_TEST, BEFORE_CLASS, AFTER_CLASS } @@ -94,7 +94,7 @@ public abstract class BaseClassSuite(name: String, ignored: open fun getCompanion(): COMPANION = throw NotImplementedError("Test class has no companion object") companion object { - val INSTANCE_KINDS = listOf(TestFunctionKind.BEFORE_EACH, TestFunctionKind.AFTER_EACH) + val INSTANCE_KINDS = listOf(TestFunctionKind.BEFORE_TEST, TestFunctionKind.AFTER_TEST) val COMPANION_KINDS = listOf(TestFunctionKind.BEFORE_CLASS, TestFunctionKind.AFTER_CLASS) } @@ -110,8 +110,8 @@ public abstract class BaseClassSuite(name: String, ignored: return companionFunction.getOrPut(kind) { mutableSetOf() } } - val before: Collection Unit> get() = getInstanceFunctions(TestFunctionKind.BEFORE_EACH) - val after: Collection Unit> get() = getInstanceFunctions(TestFunctionKind.AFTER_EACH) + val before: Collection Unit> get() = getInstanceFunctions(TestFunctionKind.BEFORE_TEST) + val after: Collection Unit> get() = getInstanceFunctions(TestFunctionKind.AFTER_TEST) val beforeClass: Collection Unit> get() = getCompanionFunctions(TestFunctionKind.BEFORE_CLASS) val afterClass: Collection Unit> get() = getCompanionFunctions(TestFunctionKind.AFTER_CLASS) @@ -152,8 +152,8 @@ public class TopLevelSuite(name: String): AbstractTestSuite(name, f private val specialFunctions = mutableMapOf>() private fun getFunctions(type: TestFunctionKind) = specialFunctions.getOrPut(type) { mutableSetOf() } - val before: Collection get() = getFunctions(TestFunctionKind.BEFORE_EACH) - val after: Collection get() = getFunctions(TestFunctionKind.AFTER_EACH) + val before: Collection get() = getFunctions(TestFunctionKind.BEFORE_TEST) + val after: Collection get() = getFunctions(TestFunctionKind.AFTER_TEST) val beforeClass: Collection get() = getFunctions(TestFunctionKind.BEFORE_CLASS) val afterClass: Collection get() = getFunctions(TestFunctionKind.AFTER_CLASS)