• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package bytecode_test
2 
3 import kotlinx.atomicfu.*
4 import kotlin.test.*
5 
6 class AtomicFieldTest {
7     private val _state = atomic(0)
8 
9     @Test
testAtomicFieldnull10     fun testAtomicField() {
11         assertEquals(0, _state.value)
12         assertTrue(_state.compareAndSet(0, 42))
13         assertEquals(42, _state.value)
14     }
15 }