Hannes
09/01/2020, 3:28 PMcommonTest
I have the following definition:
expect fun suspendTest(body: suspend CoroutineScope.() -> Unit)
In jvmTest
then I have
actual fun suspendTest(body: suspend CoroutineScope.() -> Unit) {
runBlocking { body() }
}
That works as expected.
However in nativeTest
, where I have the same actual
implementation it doesnt work.
Compiler says that it cannot find the actual suspendTest for IosX64:
e: FlowRedux/flowredux/src/commonTest/kotlin/TestUtils.kt: (3, 12): Expected function ‘suspendTest’ has no actual declaration in module <com.freeletics.flowredux:flowredux_test> for Native
e: FlowRedux/flowredux/src/nativeTest/kotlin/com/freeletics/flowredux/TestUtils.kt: (6, 12): Actual function ‘suspendTest’ has no corresponding expected declaration