Home
last modified time | relevance | path

Searched refs:refArr (Results 1 – 6 of 6) sorted by relevance

/external/kotlinx.atomicfu/atomicfu/src/commonTest/kotlin/kotlinx/atomicfu/test/
DArrayElementInlineFuncTest.kt10 private val refArr = atomicArrayOfNulls<Box>(5) in <lambda>() constant in kotlinx.atomicfu.test.ArrayElementInlineFuncTest
26 refArr[0].lazySet(Box(5)) in <lambda>()
27 refArr[0].update { cur -> cur?.let { Box(cur.n * 10) } } in <lambda>()
28 assertEquals(refArr[0].value!!.n, 50) in <lambda>()
33 refArr[0].lazySet(Box(5)) in <lambda>()
34 assertEquals(refArr[0].getAndUpdate { cur -> action(cur) }!!.n, 5) in <lambda>()
35 assertEquals(refArr[0].value!!.n, 50) in <lambda>()
40 refArr[0].lazySet(Box(5)) in <lambda>()
41 assertEquals(refArr[0].updateAndGet { cur -> action(cur) }!!.n, 50) in <lambda>()
DAtomicArrayTest.kt74 A.refArr[0].value = a2 in testRefArray()
75 check(A.refArr[0].value!!.n == 2) in testRefArray()
76 check(A.refArr[0].compareAndSet(a2, a3)) in testRefArray()
77 check(A.refArr[0].value!!.n == 3) in testRefArray()
78 val r0 = A.refArr[0].value in testRefArray()
79 A.refArr[3].value = r0 in testRefArray()
80 check(A.refArr[3].value!!.n == 3) in testRefArray()
82 check(A.refArr[3].compareAndSet(a3, a)) in testRefArray()
115 val refArr = AtomicArray<ARef>(10) constant
DTopLevelTest.kt19 private val refArr = AtomicArray<ANode<BNode<CNode>>>(5) in <lambda>() constant
159 refArr[0].value = a2 in testRefArray()
160 check(refArr[0].value!!.b.c.d == 2) in testRefArray()
161 check(refArr[0].compareAndSet(a2, a3)) in testRefArray()
162 check(refArr[0].value!!.b.c.d == 3) in testRefArray()
163 val r0 = refArr[0].value in testRefArray()
164 refArr[3].value = r0 in testRefArray()
165 check(refArr[3].value!!.b.c.d == 3) in testRefArray()
167 check(refArr[3].compareAndSet(a3, a)) in testRefArray()
DInternalTest.kt18 internal val refArr = atomicArrayOfNulls<String>(10) constant in kotlinx.atomicfu.test.A
20 fun set(index: Int, data: String) = refArr[index].compareAndSet(null, data) in set()
DSetArrayElementTest.kt31 private val refArr = atomicArrayOfNulls<ARef>(5) constant in kotlinx.atomicfu.test.ArrayElementSetters
35 fun setRef(index: Int, data: ARef) = refArr[index].compareAndSet(null, data) in setInt()
/external/kotlinx.atomicfu/atomicfu/src/commonTest/kotlin/internal_test1/
DB.kt24 check(a.refArr[3].compareAndSet(null, "OK")) in testInternal()
25 assertEquals("OK", a.refArr[3].value) in testInternal()