diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux/type/resource.lux | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/stdlib/source/test/lux/type/resource.lux b/stdlib/source/test/lux/type/resource.lux index 637f0a564..298b95ad7 100644 --- a/stdlib/source/test/lux/type/resource.lux +++ b/stdlib/source/test/lux/type/resource.lux @@ -7,7 +7,10 @@ [monad [indexed (#+ do)]]] [control - ["." io]]] + ["." io]] + [data + [number + ["n" nat]]]] {1 ["." / (#+ Res)]}) @@ -16,7 +19,7 @@ (<| (_.context (%.name (name-of /._))) ($_ _.and (_.test "Can produce and consume keys in an ordered manner." - (<| (n/= (n/+ 123 456)) + (<| (n.= (n.+ 123 456)) io.run /.run-sync (do /.sync @@ -24,9 +27,9 @@ res|right (/.ordered-sync 456) right (/.read-sync res|right) left (/.read-sync res|left)] - (wrap (n/+ left right))))) + (wrap (n.+ left right))))) (_.test "Can exchange commutative keys." - (<| (n/= (n/+ 123 456)) + (<| (n.= (n.+ 123 456)) io.run /.run-sync (do /.sync @@ -35,9 +38,9 @@ _ (/.exchange-sync [1 0]) left (/.read-sync res|left) right (/.read-sync res|right)] - (wrap (n/+ left right))))) + (wrap (n.+ left right))))) (_.test "Can group and un-group keys." - (<| (n/= (n/+ 123 456)) + (<| (n.= (n.+ 123 456)) io.run /.run-sync (do /.sync @@ -47,5 +50,5 @@ _ (/.un-group-sync 2) right (/.read-sync res|right) left (/.read-sync res|left)] - (wrap (n/+ left right))))) + (wrap (n.+ left right))))) ))) |