[JS IR] Fix kotlin.test framework
This commit is contained in:
+1
-1
@@ -56,7 +56,7 @@ class TestGenerator(val context: JsIrBackendContext) : FileLoweringPass {
|
|||||||
): FunctionWithBody {
|
): FunctionWithBody {
|
||||||
val body = JsIrBuilder.buildBlockBody(emptyList())
|
val body = JsIrBuilder.buildBlockBody(emptyList())
|
||||||
|
|
||||||
val function = JsIrBuilder.buildFunction("$name test fun", context.irBuiltIns.unitType, parentFunction)
|
val function = JsIrBuilder.buildFunction("$name test fun", context.irBuiltIns.anyNType, parentFunction)
|
||||||
function.body = body
|
function.body = body
|
||||||
|
|
||||||
val parentBody = parentFunction.body as IrBlockBody
|
val parentBody = parentFunction.body as IrBlockBody
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ internal fun suite(name: String, ignored: Boolean, suiteFn: () -> Unit) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@JsName("test")
|
@JsName("test")
|
||||||
internal fun test(name: String, ignored: Boolean, testFn: () -> Unit) {
|
internal fun test(name: String, ignored: Boolean, testFn: () -> Any?) {
|
||||||
adapter().test(name, ignored, testFn)
|
adapter().test(name, ignored, testFn)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user