jvmTest.com.michaeltroger.latintocyrillic.runTest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of latin-to-cyrillic Show documentation
Show all versions of latin-to-cyrillic Show documentation
A Kotlin Multiplatform Library for Latin to Cyrillic transliteration
The newest version!
package com.michaeltroger.latintocyrillic
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.asCoroutineDispatcher
import kotlinx.coroutines.runBlocking
import java.util.concurrent.Executors
import kotlin.coroutines.CoroutineContext
internal actual val testCoroutineContext: CoroutineContext =
Executors.newSingleThreadExecutor().asCoroutineDispatcher()
internal actual fun runBlockingTest(block: suspend CoroutineScope.() -> Unit) =
runBlocking(testCoroutineContext) { this.block() }