Unify kotlin.test docs

This commit is contained in:
Ilya Gorbunov
2018-10-23 04:05:48 +03:00
parent 3c46bb9d03
commit efa7bf0c37
3 changed files with 9 additions and 6 deletions
@@ -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)
@@ -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)
@@ -45,8 +45,9 @@ actual fun <T : Throwable> assertFailsWith(exceptionClass: KClass<T>, 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) {