[kotlin-test] Explicit public visibility and return types

This commit is contained in:
Ilya Gorbunov
2023-11-13 00:37:48 +01:00
committed by Space Team
parent 3a5276f4d3
commit 66639d37ec
11 changed files with 110 additions and 110 deletions
@@ -9,10 +9,10 @@ package kotlin.test
* Describes the result of an assertion execution.
*/
public external interface AssertionResult {
val result: Boolean
val expected: Any?
val actual: Any?
val lazyMessage: () -> String?
public val result: Boolean
public val expected: Any?
public val actual: Any?
public val lazyMessage: () -> String?
}
internal var assertHook: (AssertionResult) -> Unit = { _ -> }
@@ -31,7 +31,7 @@ public external interface FrameworkAdapter {
* @param ignored whether the test suite is ignored, e.g. marked with [Ignore] annotation
* @param suiteFn defines nested suites by calling [kotlin.test.suite] and tests by calling [kotlin.test.test]
*/
fun suite(name: String, ignored: Boolean, suiteFn: () -> Unit)
public fun suite(name: String, ignored: Boolean, suiteFn: () -> Unit)
/**
* Declares a test.
@@ -40,5 +40,5 @@ public external interface FrameworkAdapter {
* @param ignored whether the test is ignored
* @param testFn contains test body invocation
*/
fun test(name: String, ignored: Boolean, testFn: () -> Any?)
public fun test(name: String, ignored: Boolean, testFn: () -> Any?)
}
@@ -12,7 +12,7 @@ import kotlin.reflect.KClass
*
* This keeps the code under test referenced, but doesn't actually test it until it is implemented.
*/
actual fun todo(block: () -> Unit) {
public actual fun todo(block: () -> Unit) {
// println("TODO at " + (Exception() as java.lang.Throwable).getStackTrace()?.get(1) + " for " + block)
println("TODO at " + block)
}
@@ -66,10 +66,10 @@ internal fun adapter(): FrameworkAdapter {
}
@JsName("kotlinTest")
external val kotlinTestNamespace: KotlinTestNamespace
public external val kotlinTestNamespace: KotlinTestNamespace
external interface KotlinTestNamespace {
val adapterTransformer: ((FrameworkAdapter) -> FrameworkAdapter)?
public external interface KotlinTestNamespace {
public val adapterTransformer: ((FrameworkAdapter) -> FrameworkAdapter)?
}
internal fun detectAdapter(): FrameworkAdapter {