diff options
Diffstat (limited to 'stdlib/source/test/lux/math/number/i64.lux')
-rw-r--r-- | stdlib/source/test/lux/math/number/i64.lux | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/stdlib/source/test/lux/math/number/i64.lux b/stdlib/source/test/lux/math/number/i64.lux index 550d6f03d..75324e869 100644 --- a/stdlib/source/test/lux/math/number/i64.lux +++ b/stdlib/source/test/lux/math/number/i64.lux @@ -22,7 +22,7 @@ Test (do [! random.monad] [pattern random.nat - idx (# ! each (n.% /.width) random.nat)] + idx (at ! each (n.% /.width) random.nat)] (all _.and (_.coverage [/.one? /.one] (if (/.one? idx pattern) @@ -48,7 +48,7 @@ [pattern random.nat] (all _.and (do ! - [idx (# ! each (|>> (n.% (-- /.width)) ++) random.nat)] + [idx (at ! each (|>> (n.% (-- /.width)) ++) random.nat)] (_.coverage [/.left_shifted /.right_shifted] (let [nullity! (and (/#= pattern (/.left_shifted 0 pattern)) @@ -74,7 +74,7 @@ (<| (_.for [/.Mask]) (do [! random.monad] [pattern random.nat - idx (# ! each (n.% /.width) random.nat) + idx (at ! each (n.% /.width) random.nat) signed random.int] (all _.and (_.coverage [/.sign] @@ -98,9 +98,9 @@ empty! full!))) (do ! - [size (# ! each (n.% /.width) random.nat) + [size (at ! each (n.% /.width) random.nat) .let [spare (n.- size /.width)] - offset (# ! each (n.% spare) random.nat)] + offset (at ! each (n.% spare) random.nat)] (_.coverage [/.region] (case size 0 (/#= /.false (/.region offset size)) @@ -122,7 +122,7 @@ Test (_.for [/.Sub] (do [! random.monad] - [size (# ! each (n.% /.width) random.nat)] + [size (at ! each (n.% /.width) random.nat)] (case (/.sub size) {.#None} (_.coverage [/.sub] @@ -130,19 +130,19 @@ {.#Some sub} (do [! random.monad] - [.let [limit (|> (-- (# sub bits)) + [.let [limit (|> (-- (at sub bits)) /.mask .int ++)] - expected (# ! each (i.% limit) random.int) + expected (at ! each (i.% limit) random.int) .let [random (is (All (_ size) (-> (-> I64 (I64 size)) (Random (I64 size)))) (function (_ narrow) - (# random.functor each narrow random.i64)))]] + (at random.functor each narrow random.i64)))]] (all _.and - ($equivalence.spec (# sub sub_equivalence) (random (# sub narrow))) + ($equivalence.spec (at sub sub_equivalence) (random (at sub narrow))) (_.coverage [/.sub] - (let [actual (|> expected .i64 (# sub narrow) (# sub wide))] + (let [actual (|> expected .i64 (at sub narrow) (at sub wide))] (/#= expected actual))) )))))) @@ -165,7 +165,7 @@ (_.for [.I64]) (do [! random.monad] [pattern random.nat - idx (# ! each (n.% /.width) random.nat)] + idx (at ! each (n.% /.width) random.nat)] (all _.and (_.coverage [/.width /.bits_per_byte /.bytes_per_i64] (and (n.= /.bytes_per_i64 |