aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/control/concurrency/atom.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/control/concurrency/atom.lux')
-rw-r--r--stdlib/source/test/lux/control/concurrency/atom.lux22
1 files changed, 11 insertions, 11 deletions
diff --git a/stdlib/source/test/lux/control/concurrency/atom.lux b/stdlib/source/test/lux/control/concurrency/atom.lux
index aec2d56d9..e3c5a9b89 100644
--- a/stdlib/source/test/lux/control/concurrency/atom.lux
+++ b/stdlib/source/test/lux/control/concurrency/atom.lux
@@ -20,22 +20,22 @@
(do random.monad
[expected random.nat
.let [box (/.atom expected)]]
- (_.cover [/.Atom /.atom /.read]
+ (_.cover [/.Atom /.atom /.read!]
(io.run
(do io.monad
- [actual (/.read box)]
+ [actual (/.read! box)]
(in (is? expected actual))))))
(do random.monad
[target random.nat
unknown (random.only (|>> (is? target) not) random.nat)
expected random.nat
.let [box (/.atom target)]]
- (_.cover [/.compare_and_swap]
+ (_.cover [/.compare_and_swap!]
(io.run
(do io.monad
- [swapped_unknown? (/.compare_and_swap unknown expected box)
- swapped_target? (/.compare_and_swap target expected box)
- actual (/.read box)]
+ [swapped_unknown? (/.compare_and_swap! unknown expected box)
+ swapped_target? (/.compare_and_swap! target expected box)
+ actual (/.read! box)]
(in (and (not swapped_unknown?)
swapped_target?
(is? expected actual)))))))
@@ -43,10 +43,10 @@
[init random.nat
shift random.nat
.let [box (/.atom init)]]
- (_.cover [/.update]
+ (_.cover [/.update!]
(io.run
(do io.monad
- [[pre post] (/.update (n.+ shift) box)]
+ [[pre post] (/.update! (n.+ shift) box)]
(in (and (is? init pre)
(n.= (n.+ shift init)
post)))))))
@@ -54,11 +54,11 @@
[pre random.nat
post random.nat
.let [box (/.atom pre)]]
- (_.cover [/.write]
+ (_.cover [/.write!]
(io.run
(do io.monad
- [old (/.write post box)
- new (/.read box)]
+ [old (/.write! post box)
+ new (/.read! box)]
(in (and (is? pre old)
(is? post new)))))))
)))