[Wasm] Add box tests for kotlin.test

This commit is contained in:
Igor Laevsky
2021-09-23 21:11:26 +03:00
committed by TeamCityServer
parent 14eee7c539
commit dcdc7e4633
6 changed files with 109 additions and 9 deletions
+3 -3
View File
@@ -23,7 +23,7 @@ private val underscore = kotlin.test.setAdapter(object : FrameworkAdapter {
sortingContext.suite(name, ignored) { suiteFn() }
}
override fun test(name: String, ignored: Boolean, testFn: () -> dynamic) {
override fun test(name: String, ignored: Boolean, testFn: () -> Any?) {
sortingContext.test(name, ignored) { returned(testFn()) }
}
})
@@ -42,7 +42,7 @@ interface TestBodyContext {
fun caught(msg: String)
fun returned(msg: dynamic)
fun returned(msg: Any?)
}
private sealed class Entity(val name: String,
@@ -126,7 +126,7 @@ private class LoggingContext : SuiteContext, TestBodyContext{
record("caught(\"$msg\")")
}
override fun returned(msg: dynamic) = indent {
override fun returned(msg: Any?) = indent {
if (msg is String) record("returned(\"$msg\")")
}