Skip to content

Commit

Permalink
add simple native and common test
Browse files Browse the repository at this point in the history
  • Loading branch information
oshai committed Oct 29, 2022
1 parent 0c82d79 commit 8dbb266
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ kotlin {
val nativeMain by creating {
dependsOn(commonMain)
}
val nativeTest by creating {
dependsOn(nativeMain)
dependencies {
implementation(kotlin("test"))
}
}
val linuxMain by creating {
dependsOn(nativeMain)
}
Expand Down
12 changes: 12 additions & 0 deletions src/commonTest/kotlin/mu/SimpleTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package mu

import kotlin.test.Test

class SimpleTest {
private val logger = KotlinLogging.logger {}

@Test
fun simpleTest() {
logger.info { "Hello!" }
}
}
9 changes: 9 additions & 0 deletions src/nativeTest/kotlin/mu/SimpleTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package mu

class SimpleTest {}

private val logger = KotlinLogging.logger {}

fun main() {
logger.info { "Hello!" }
}

0 comments on commit 8dbb266

Please sign in to comment.