diff options
author | Eduardo Julian | 2022-04-06 21:52:30 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-04-06 21:52:30 -0400 |
commit | b0d725f24335e82eefc77175efc0a5282951316e (patch) | |
tree | 18a5cc4b318776250442311636a415a5cc2c1f20 /stdlib/source/test | |
parent | a0ed5fd377daf5754697636504de8e180abf9ec0 (diff) |
More efficient binary formatting.
Diffstat (limited to 'stdlib/source/test')
-rw-r--r-- | stdlib/source/test/lux/data/collection/dictionary.lux | 10 | ||||
-rw-r--r-- | stdlib/source/test/lux/target/lua.lux | 6 | ||||
-rw-r--r-- | stdlib/source/test/lux/time/duration.lux | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/stdlib/source/test/lux/data/collection/dictionary.lux b/stdlib/source/test/lux/data/collection/dictionary.lux index 95f2bed9e..491e35448 100644 --- a/stdlib/source/test/lux/data/collection/dictionary.lux +++ b/stdlib/source/test/lux/data/collection/dictionary.lux @@ -108,21 +108,21 @@ (n.= (/.size dict) (list.size (/.values dict)))) - (_.cover [/.merged] + (_.cover [/.composite] (let [merging_with_oneself (let [(open "[0]") (/.equivalence n.equivalence)] - (= dict (/.merged dict dict))) + (= dict (/.composite dict dict))) overwritting_keys (let [dict' (|> dict /.entries (list#each (function (_ [k v]) [k (++ v)])) (/.of_list n.hash)) (open "[0]") (/.equivalence n.equivalence)] - (= dict' (/.merged dict' dict)))] + (= dict' (/.composite dict' dict)))] (and merging_with_oneself overwritting_keys))) - (_.cover [/.merged_with] + (_.cover [/.composite_with] (list.every? (function (_ [x x*2]) (n.= (n.* 2 x) x*2)) (list.zipped_2 (/.values dict) - (/.values (/.merged_with n.+ dict dict))))) + (/.values (/.composite_with n.+ dict dict))))) (_.cover [/.of_list] (let [(open "[0]") (/.equivalence n.equivalence)] diff --git a/stdlib/source/test/lux/target/lua.lux b/stdlib/source/test/lux/target/lua.lux index 3068a6e18..31d4a6f95 100644 --- a/stdlib/source/test/lux/target/lua.lux +++ b/stdlib/source/test/lux/target/lua.lux @@ -22,7 +22,7 @@ ["[0]" list ("[1]#[0]" functor)]]] [macro ["[0]" template]] - ["[0]" math + [math ["[0]" random {"+" Random} ("[1]#[0]" monad)] [number ["n" nat] @@ -94,7 +94,7 @@ )))) (template [<bits>] - [(`` (def: (~~ (template.symbol [int/ <bits>])) + [(`` (def: (~~ (template.symbol [int_ <bits>])) (Random Int) (let [mask (|> 1 (i64.left_shifted (-- <bits>)) --)] (random#each (|>> (i64.and mask) .int) random.nat))))] @@ -164,7 +164,7 @@ [/.* f.* |>] [/./ f./ |>] [/.% f.mod |>] - [/.^ math.pow f.abs] + [/.^ f.pow f.abs] )) (~~ (template [</> <lux>] [(_.cover [</>] diff --git a/stdlib/source/test/lux/time/duration.lux b/stdlib/source/test/lux/time/duration.lux index af1550e29..0ff2471d8 100644 --- a/stdlib/source/test/lux/time/duration.lux +++ b/stdlib/source/test/lux/time/duration.lux @@ -45,13 +45,13 @@ expected random.duration parameter random.duration] ($_ _.and - (_.cover [/.merged /.difference] - (|> expected (/.merged parameter) (/.difference parameter) (#= expected))) + (_.cover [/.composite /.difference] + (|> expected (/.composite parameter) (/.difference parameter) (#= expected))) (_.cover [/.empty] - (|> expected (/.merged /.empty) (#= expected))) + (|> expected (/.composite /.empty) (#= expected))) (_.cover [/.inverse] (and (|> expected /.inverse /.inverse (#= expected)) - (|> expected (/.merged (/.inverse expected)) (#= /.empty)))) + (|> expected (/.composite (/.inverse expected)) (#= /.empty)))) (_.cover [/.positive? /.negative? /.neutral?] (or (bit#= (/.positive? expected) (/.negative? (/.inverse expected))) |