Skip to content

Commit

Permalink
Add kotlin-test dependency to commonMain sourceSet
Browse files Browse the repository at this point in the history
  • Loading branch information
mvicsokolova committed Nov 13, 2023
1 parent 191ac44 commit 77121f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
5 changes: 1 addition & 4 deletions integration-testing/examples/mpp-sample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,10 @@ kotlin {
commonMain {
dependencies {
implementation(kotlin("stdlib"))
}
}
commonTest {
dependencies {
implementation(kotlin("test-junit"))
}
}
commonTest {}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ class IntArithmetic {
val x get() = _x.value

fun doWork(finalValue: Int) {
check(x == 0)
_x.getAndSet(3)
check(x == 3)
_x.compareAndSet(3, finalValue)
check(x == finalValue)
assertEquals(0, x)
assertEquals(0, _x.getAndSet(3))
assertEquals(3, x)
assertTrue(_x.compareAndSet(3, finalValue))
}
}

0 comments on commit 77121f8

Please sign in to comment.