Attempt on fixing tests

This commit is contained in:
kildishevps committed 2025-01-22 23:25:20 +03:00
1 parent db219a351f
commit f548a162e7
6 files changed
+20 -22

No files matched your search

@@ -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)
// }
//}