diff --git a/backend.native/tests/testing/annotations.kt b/backend.native/tests/testing/annotations.kt index 3d4638eb3f5..2c1a28f6ae8 100644 --- a/backend.native/tests/testing/annotations.kt +++ b/backend.native/tests/testing/annotations.kt @@ -41,8 +41,8 @@ class A { @AfterClass fun afterClass() { println("afterClass (A)") } object O { - @BeforeEach fun before() { println("before (A.object)") } - @AfterEach fun after() { println("after (A.object)") } + @BeforeTest fun before() { println("before (A.object)") } + @AfterTest fun after() { println("after (A.object)") } @Test fun test1() { println("test1 (A.object)") } @Ignore @Test fun ignoredTest() { throw AssertionError("Ignored test") } @@ -52,8 +52,8 @@ class A { } object O { - @BeforeEach fun before() { println("before (object)") } - @AfterEach fun after() { println("after (object)") } + @BeforeTest fun before() { println("before (object)") } + @AfterTest fun after() { println("after (object)") } @Test fun test1() { println("test1 (object)") } @Ignore @Test fun ignoredTest() { throw AssertionError("Ignored test") } @@ -61,8 +61,8 @@ object O { @AfterClass fun afterClass() { println("afterClass (object)") } } -@BeforeEach fun before() { println("before (file)") } -@AfterEach fun after() { println("after (file)") } +@BeforeTest fun before() { println("before (file)") } +@AfterTest fun after() { println("after (file)") } @Test fun test1() { println("test1 (file)") } @Ignore @Test fun ignoredTest() { throw AssertionError("Ignored test") } diff --git a/runtime/src/main/kotlin/kotlin/test/Annotation.kt b/runtime/src/main/kotlin/kotlin/test/Annotation.kt index 92ab8b15f8a..0dc98487596 100644 --- a/runtime/src/main/kotlin/kotlin/test/Annotation.kt +++ b/runtime/src/main/kotlin/kotlin/test/Annotation.kt @@ -41,7 +41,7 @@ public actual annotation class AfterTest @Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION) public actual annotation class Ignore -@Deprecated("AfterEach should be replaced with AfterTest to unify usage of kotlin.test") +@Deprecated("AfterEach should be replaced with AfterTest to unify usage of kotlin.test", level = DeprecationLevel.ERROR) public typealias AfterEach = AfterTest -@Deprecated("BeforeEach should be replaced with BeforeTest to unify usage of kotlin.test") +@Deprecated("BeforeEach should be replaced with BeforeTest to unify usage of kotlin.test", level = DeprecationLevel.ERROR) public typealias BeforeEach = BeforeTest