From d0198d1ff85a03cabbc9d2517428f877c9c50012 Mon Sep 17 00:00:00 2001 From: Simon Vergauwen Date: Mon, 26 Jul 2021 11:37:50 +0200 Subject: [PATCH] Fix test impl atomic on JS (#2455) --- .../src/commonTest/kotlin/arrow/fx/coroutines/AtomicTest.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arrow-libs/fx/arrow-fx-coroutines/src/commonTest/kotlin/arrow/fx/coroutines/AtomicTest.kt b/arrow-libs/fx/arrow-fx-coroutines/src/commonTest/kotlin/arrow/fx/coroutines/AtomicTest.kt index 4d9404ece2c..19c36f48dd1 100644 --- a/arrow-libs/fx/arrow-fx-coroutines/src/commonTest/kotlin/arrow/fx/coroutines/AtomicTest.kt +++ b/arrow-libs/fx/arrow-fx-coroutines/src/commonTest/kotlin/arrow/fx/coroutines/AtomicTest.kt @@ -36,12 +36,12 @@ class AtomicTest : ArrowFxSpec( } "access - setter should fail if value is modified before setter is called" { - checkAll(Arb.int(), Arb.int(), Arb.int()) { x, y, z -> + checkAll(Arb.int(), Arb.int()) { x, z -> val ref = Atomic(x) val (_, setter) = ref.access() - ref.set(y) + ref.update { it + 1 } setter(z) shouldBe false - ref.get() shouldBe y + ref.get() shouldBe x + 1 } }