Increase deprecation level for test annotations

(cherry picked from commit 7fb28ec008f82231c6a9217b66807e8eb8c5bac7)
This commit is contained in:
Ilya Gorbunov
2020-06-19 00:19:54 +03:00
committed by Vasily Levchenko
parent a27c1e10b5
commit b0e30130b4
2 changed files with 8 additions and 8 deletions
+6 -6
View File
@@ -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") }
@@ -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