Attempt on fixing tests
This commit is contained in:
parent
db219a351f
commit
f548a162e7
@ -18,10 +18,8 @@
|
||||
@file:Suppress("UnstableApiUsage")
|
||||
|
||||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
|
||||
import org.jetbrains.kotlin.gradle.targets.js.testing.KotlinJsTest
|
||||
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
|
||||
import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeTest
|
||||
|
||||
plugins {
|
||||
|
@ -36,6 +36,6 @@ fun testBlocking(block : suspend () -> Unit) {
|
||||
block.startCoroutine(continuation)
|
||||
}
|
||||
|
||||
expect fun runTest(block: suspend (scope : CoroutineScope) -> Unit)
|
||||
fun runTest(block: suspend (scope : CoroutineScope) -> Unit) = kotlinx.coroutines.test.runTest { block(this) }
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.ionspin.kotlin.crypto.util
|
||||
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.promise
|
||||
|
||||
actual fun runTest(block: suspend (scope : CoroutineScope) -> Unit): dynamic = GlobalScope.promise { block(this) }
|
||||
//import kotlinx.coroutines.CoroutineScope
|
||||
//import kotlinx.coroutines.GlobalScope
|
||||
//import kotlinx.coroutines.promise
|
||||
//
|
||||
//actual fun runTest(block: suspend (scope : CoroutineScope) -> Unit): dynamic = GlobalScope.promise { block(this) }
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.ionspin.kotlin.crypto.util
|
||||
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.runBlocking
|
||||
|
||||
actual fun runTest(block: suspend (scope : CoroutineScope) -> Unit) = runBlocking { block(this) }
|
||||
//import kotlinx.coroutines.CoroutineScope
|
||||
//import kotlinx.coroutines.runBlocking
|
||||
//
|
||||
//actual fun runTest(block: suspend (scope : CoroutineScope) -> Unit) = runBlocking { block(this) }
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.ionspin.kotlin.crypto.util
|
||||
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.runBlocking
|
||||
|
||||
actual fun runTest(block: suspend (scope : CoroutineScope) -> Unit) = runBlocking { block(this) }
|
||||
//import kotlinx.coroutines.CoroutineScope
|
||||
//import kotlinx.coroutines.runBlocking
|
||||
//
|
||||
//actual fun runTest(block: suspend (scope : CoroutineScope) -> Unit) = runBlocking { block(this) }
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
package com.ionspin.kotlin.crypto.util
|
||||
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
//import kotlinx.coroutines.CoroutineScope
|
||||
|
||||
|
||||
actual fun runTest(block: suspend (scope : CoroutineScope) -> Unit) {
|
||||
kotlinx.coroutines.test.runTest {
|
||||
block(this)
|
||||
}
|
||||
}
|
||||
//actual fun runTest(block: suspend (scope : CoroutineScope) -> Unit) {
|
||||
// kotlinx.coroutines.test.runTest {
|
||||
// block(this)
|
||||
// }
|
||||
//}
|
||||
|
Loading…
x
Reference in New Issue
Block a user