From efa7bf0c3720769e420b22a486d49ef867d63d5a Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Tue, 23 Oct 2018 04:05:48 +0300 Subject: [PATCH] Unify kotlin.test docs --- .../common/src/main/kotlin/kotlin/test/AssertionsH.kt | 5 +++-- .../kotlin.test/js/src/main/kotlin/kotlin/test/JsImpl.kt | 5 +++-- libraries/kotlin.test/jvm/src/main/kotlin/AssertionsImpl.kt | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/libraries/kotlin.test/common/src/main/kotlin/kotlin/test/AssertionsH.kt b/libraries/kotlin.test/common/src/main/kotlin/kotlin/test/AssertionsH.kt index 3a28e9aeaa3..c928018ffbb 100644 --- a/libraries/kotlin.test/common/src/main/kotlin/kotlin/test/AssertionsH.kt +++ b/libraries/kotlin.test/common/src/main/kotlin/kotlin/test/AssertionsH.kt @@ -8,8 +8,9 @@ package kotlin.test import kotlin.reflect.KClass /** - * Comments out a block of test code until it is implemented while keeping a link to the code - * to implement in your unit test output + * Takes the given [block] of test code and _doesn't_ execute it. + * + * This keeps the code under test referenced, but doesn't actually test it until it is implemented. */ expect fun todo(block: () -> Unit) diff --git a/libraries/kotlin.test/js/src/main/kotlin/kotlin/test/JsImpl.kt b/libraries/kotlin.test/js/src/main/kotlin/kotlin/test/JsImpl.kt index 03fdbaf65ed..8f121a04517 100644 --- a/libraries/kotlin.test/js/src/main/kotlin/kotlin/test/JsImpl.kt +++ b/libraries/kotlin.test/js/src/main/kotlin/kotlin/test/JsImpl.kt @@ -8,8 +8,9 @@ package kotlin.test import kotlin.reflect.KClass /** - * Comments out a block of test code until it is implemented while keeping a link to the code - * to implement in your unit test output + * Takes the given [block] of test code and _doesn't_ execute it. + * + * This keeps the code under test referenced, but doesn't actually test it until it is implemented. */ actual fun todo(block: () -> Unit) { // println("TODO at " + (Exception() as java.lang.Throwable).getStackTrace()?.get(1) + " for " + block) diff --git a/libraries/kotlin.test/jvm/src/main/kotlin/AssertionsImpl.kt b/libraries/kotlin.test/jvm/src/main/kotlin/AssertionsImpl.kt index 684fbfbaf28..9468203716f 100644 --- a/libraries/kotlin.test/jvm/src/main/kotlin/AssertionsImpl.kt +++ b/libraries/kotlin.test/jvm/src/main/kotlin/AssertionsImpl.kt @@ -45,8 +45,9 @@ actual fun assertFailsWith(exceptionClass: KClass, message: S /** - * Comments out a [block] of test code until it is implemented while keeping a link to the code - * to implement in your unit test output + * Takes the given [block] of test code and _doesn't_ execute it. + * + * This keeps the code under test referenced, but doesn't actually test it until it is implemented. */ @InlineOnly actual inline fun todo(@Suppress("UNUSED_PARAMETER") block: () -> Unit) {