diff --git a/backend.native/tests/testing/annotations.kt b/backend.native/tests/testing/annotations.kt index 34f48f95201..deec15b52d7 100644 --- a/backend.native/tests/testing/annotations.kt +++ b/backend.native/tests/testing/annotations.kt @@ -20,16 +20,16 @@ object IgnoredObject { class A { companion object { - @BeforeEach fun before() { println("before (A.companion)") } - @AfterEach fun after() { println("after (A.companion)") } + @BeforeTest fun before() { println("before (A.companion)") } + @AfterTest fun after() { println("after (A.companion)") } @Test fun test1() { println("test1 (A.companion)") } @BeforeClass fun beforeClass() { println("beforeClass (A.companion)") } @AfterClass fun afterClass() { println("afterClass (A.companion)") } } - @BeforeEach fun before() { println("before (A)") } - @AfterEach fun after() { println("after (A)") } + @BeforeTest fun before() { println("before (A)") } + @AfterTest fun after() { println("after (A)") } @Test fun test1() { println("test1 (A)") } @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 31e97005f30..7a2933acafd 100644 --- a/runtime/src/main/kotlin/kotlin/test/Annotation.kt +++ b/runtime/src/main/kotlin/kotlin/test/Annotation.kt @@ -58,3 +58,6 @@ annotation class AfterEach @Retention(AnnotationRetention.SOURCE) @Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION) annotation class Ignore + +typealias AfterTest = AfterEach +typealias BeforeTest = BeforeEach