aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
authorEduardo Julian2022-04-06 16:07:22 -0400
committerEduardo Julian2022-04-06 16:07:22 -0400
commita0ed5fd377daf5754697636504de8e180abf9ec0 (patch)
tree8cc47f78ac6557c4ba233e6debd7b836adfb65b1 /stdlib/source/test
parent0494295b95c5c44ef389f1259e408f9445cfe0a1 (diff)
More efficient binary parsing.
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/data/binary.lux12
-rw-r--r--stdlib/source/test/lux/target/ruby.lux4
2 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux
index 656dbf9bf..badf40980 100644
--- a/stdlib/source/test/lux/data/binary.lux
+++ b/stdlib/source/test/lux/data/binary.lux
@@ -75,9 +75,9 @@
(def: as_list
(-> /.Binary (List Nat))
- (/.aggregate (function (_ head tail)
- {.#Item head tail})
- (list)))
+ (/.mix (function (_ head tail)
+ {.#Item head tail})
+ (list)))
(def: test|unsafe
Test
@@ -160,9 +160,9 @@
($equivalence.spec /.equivalence (..random size)))
(_.for [/.monoid]
($monoid.spec /.equivalence /.monoid (..random size)))
- (_.cover [/.aggregate]
+ (_.cover [/.mix]
(n.= (# list.mix mix n.+ 0 (..as_list sample))
- (/.aggregate n.+ 0 sample)))
+ (/.mix n.+ 0 sample)))
(_.cover [/.empty]
(# /.equivalence =
@@ -212,7 +212,7 @@
{.#Item head tail}
(n.= (list.mix n.+ 0 tail)
- (/.aggregate n.+ 0 (/.after 1 sample))))))
+ (/.mix n.+ 0 (/.after 1 sample))))))
(_.cover [/.copy!]
(and (case (/.copy! size 0 sample 0 (/.empty size))
{try.#Success output}
diff --git a/stdlib/source/test/lux/target/ruby.lux b/stdlib/source/test/lux/target/ruby.lux
index 968d3c7bd..22dee2512 100644
--- a/stdlib/source/test/lux/target/ruby.lux
+++ b/stdlib/source/test/lux/target/ruby.lux
@@ -20,7 +20,7 @@
[collection
["[0]" list ("[1]#[0]" functor)]
["[0]" set]]]
- ["[0]" math
+ [math
["[0]" random {"+" Random} ("[1]#[0]" monad)]
[number {"+" hex}
["n" nat]
@@ -122,7 +122,7 @@
[/.* f.* |>]
[/./ f./ |>]
[/.% f.mod |>]
- [/.pow math.pow f.abs]
+ [/.pow f.pow f.abs]
))
(~~ (template [</> <lux>]
[(_.cover [</>]