From f68d639c63b330ecc874179af66c107e96328b72 Mon Sep 17 00:00:00 2001 From: Anton Bannykh Date: Mon, 11 Dec 2017 16:07:36 +0300 Subject: [PATCH] Add @Target's to kotlin.test annotations --- .../src/main/kotlin/kotlin.test/Annotations.kt | 4 ++++ .../js/src/main/kotlin/kotlin/test/Annotations.kt | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libraries/kotlin.test/annotations-common/src/main/kotlin/kotlin.test/Annotations.kt b/libraries/kotlin.test/annotations-common/src/main/kotlin/kotlin.test/Annotations.kt index 71de4bc8127..a896a7fd085 100644 --- a/libraries/kotlin.test/annotations-common/src/main/kotlin/kotlin.test/Annotations.kt +++ b/libraries/kotlin.test/annotations-common/src/main/kotlin/kotlin.test/Annotations.kt @@ -19,19 +19,23 @@ package kotlin.test /** * Marks a function as a test. */ +@Target(AnnotationTarget.FUNCTION) public expect annotation class Test() /** * Marks a test or a suite as ignored. */ +@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION) public expect annotation class Ignore() /** * Marks a function to be invoked before each test. */ +@Target(AnnotationTarget.FUNCTION) public expect annotation class BeforeTest() /** * Marks a function to be invoked after each test. */ +@Target(AnnotationTarget.FUNCTION) public expect annotation class AfterTest() diff --git a/libraries/kotlin.test/js/src/main/kotlin/kotlin/test/Annotations.kt b/libraries/kotlin.test/js/src/main/kotlin/kotlin/test/Annotations.kt index 80b6d1a4cc8..95305e80b97 100644 --- a/libraries/kotlin.test/js/src/main/kotlin/kotlin/test/Annotations.kt +++ b/libraries/kotlin.test/js/src/main/kotlin/kotlin/test/Annotations.kt @@ -19,19 +19,23 @@ package kotlin.test /** * Marks a function as a test. */ +@Target(AnnotationTarget.FUNCTION) public annotation class Test /** - * Marks a test or a suite as ignored/pending. + * Marks a test or a suite as ignored. */ +@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION) public annotation class Ignore /** * Marks a function to be invoked before each test. */ +@Target(AnnotationTarget.FUNCTION) public annotation class BeforeTest /** * Marks a function to be invoked after each test. */ -public annotation class AfterTest \ No newline at end of file +@Target(AnnotationTarget.FUNCTION) +public annotation class AfterTest