1 package bytecode_test 2 3 import kotlinx.atomicfu.locks.* 4 import kotlin.test.* 5 6 class ReentrantLockTest { 7 private val lock = reentrantLock() 8 private var state = 0 9 10 @Test testLockFieldnull11 fun testLockField() { 12 lock.withLock { 13 state = 1 14 } 15 assertEquals(1, state) 16 } 17 }