Skip to content

Commit 2c11bc5

Browse files
committed
Fix inconsistent package defs
1 parent 00187e5 commit 2c11bc5

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

atomicfu/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ kotlin {
127127

128128
jvmTest {
129129
dependencies {
130-
implementation("org.jetbrains.kotlinx:lincheck:2.38")
130+
implementation("org.jetbrains.kotlinx:lincheck:2.39")
131131
implementation("org.jetbrains.kotlin:kotlin-reflect")
132132
implementation("org.jetbrains.kotlin:kotlin-test")
133133
implementation("org.jetbrains.kotlin:kotlin-test-junit")

atomicfu/src/jvmTest/kotlin/kotlinx/atomicfu/locks/NativeMutexLincheckReentrantTest.kt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import kotlinx.atomicfu.locks.NativeMutex
2-
import kotlinx.atomicfu.locks.ParkingHandle
3-
import kotlinx.atomicfu.locks.ParkingSupport
4-
import kotlinx.atomicfu.locks.ThreadParker
1+
package kotlinx.atomicfu.locks
2+
53
import org.jetbrains.kotlinx.lincheck.annotations.Operation
64
import org.jetbrains.kotlinx.lincheck.check
75
import org.jetbrains.kotlinx.lincheck.strategy.managed.modelchecking.ModelCheckingOptions
@@ -42,8 +40,8 @@ class NativeMutexLincheckReentrantTest {
4240
fun inc(): Int {
4341
localParkers.computeIfAbsent(ParkingSupport.currentThreadHandle()) { ThreadParker() }
4442
lock.lock()
45-
if (!lock.tryLock()) throw IllegalStateException("couldnt reent with trylock")
46-
if (!lock.tryLock()) throw IllegalStateException("couldnt reent with trylock")
43+
if (!lock.tryLock()) throw IllegalStateException("couldn't reenter with trylock")
44+
if (!lock.tryLock()) throw IllegalStateException("couldn't reenter with trylock")
4745
val result = counter.inc()
4846
lock.unlock()
4947
lock.unlock()
@@ -55,8 +53,8 @@ class NativeMutexLincheckReentrantTest {
5553
fun get(): Int {
5654
localParkers.computeIfAbsent(ParkingSupport.currentThreadHandle()) { ThreadParker() }
5755
lock.lock()
58-
if (!lock.tryLock()) throw IllegalStateException("couldnt reent with trylock")
59-
if (!lock.tryLock()) throw IllegalStateException("couldnt reent with trylock")
56+
if (!lock.tryLock()) throw IllegalStateException("couldn't reenter with trylock")
57+
if (!lock.tryLock()) throw IllegalStateException("couldn't reenter with trylock")
6058
val result = counter.get()
6159
lock.unlock()
6260
lock.unlock()

atomicfu/src/jvmTest/kotlin/kotlinx/atomicfu/locks/NativeMutexLincheckTest.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import kotlinx.atomicfu.locks.NativeMutex
2-
import kotlinx.atomicfu.locks.ParkingHandle
3-
import kotlinx.atomicfu.locks.ParkingSupport
4-
import kotlinx.atomicfu.locks.ThreadParker
1+
package kotlinx.atomicfu.locks
2+
53
import org.jetbrains.kotlinx.lincheck.annotations.Operation
64
import org.jetbrains.kotlinx.lincheck.check
75
import org.jetbrains.kotlinx.lincheck.strategy.managed.modelchecking.ModelCheckingOptions
@@ -17,6 +15,7 @@ class NativeMutexLincheckTest {
1715
fun inc(): Int = ++value
1816
fun get() = value
1917
}
18+
2019
private val counter = Counter()
2120
private val localParkers = ConcurrentHashMap<ParkingHandle, ThreadParker>()
2221

atomicfu/src/jvmTest/kotlin/kotlinx/atomicfu/locks/NativeMutexTimeoutLincheckTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class NativeMutexTimeoutLincheckTest {
1616
fun inc(): Int = ++value
1717
fun get() = value
1818
}
19+
1920
private val counter = Counter()
2021
private val localParkers = ConcurrentHashMap<ParkingHandle, ThreadParker>()
2122

0 commit comments

Comments
 (0)