Skip to content

Commit

Permalink
Add MacOSX64 target to coroutines and test modules
Browse files Browse the repository at this point in the history
  • Loading branch information
twyatt committed Nov 16, 2020
1 parent f803b4b commit d9cad7f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ Toolbox of utilities/helpers for Kotlin development.
- [`coroutines`](coroutines) - Tools/utilities for [Coroutines]
![badge][badge-js]
![badge][badge-jvm]
![badge][badge-macos]

- [`test`](test) - Utilities for test suites
![badge][badge-js]
![badge][badge-jvm]
![badge][badge-macos]


[Collections]: https://kotlinlang.org/docs/reference/collections-overview.html
Expand Down
1 change: 1 addition & 0 deletions coroutines/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ kotlin {

jvm()
js().browser()
macosX64()

sourceSets {
val commonMain by getting {
Expand Down
1 change: 1 addition & 0 deletions test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ kotlin {

jvm()
js().browser()
macosX64()

sourceSets {
val commonMain by getting {
Expand Down
13 changes: 13 additions & 0 deletions test/src/macosX64Main/kotlin/runTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.juul.tuulbox.test

import kotlinx.cinterop.memScoped
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.runBlocking

public actual fun runTest(
action: suspend CoroutineScope.() -> Unit
): Unit = runBlocking {
memScoped {
action.invoke(this@runBlocking)
}
}

0 comments on commit d9cad7f

Please sign in to comment.