diff options
author | Eduardo Julian | 2020-12-25 09:22:38 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-12-25 09:22:38 -0400 |
commit | 4ca397765805eda5ddee393901ed3a02001a960a (patch) | |
tree | 2ab184a1a4e244f3a69e86c8a7bb3ad49c22b4a3 /stdlib/source/test/lux/macro/poly/equivalence.lux | |
parent | d29e091e98dabb8dfcf816899ada480ecbf7e357 (diff) |
Replaced kebab-case with snake_case for naming convention.
Diffstat (limited to 'stdlib/source/test/lux/macro/poly/equivalence.lux')
-rw-r--r-- | stdlib/source/test/lux/macro/poly/equivalence.lux | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/stdlib/source/test/lux/macro/poly/equivalence.lux b/stdlib/source/test/lux/macro/poly/equivalence.lux index 16903ebc2..51315ec1e 100644 --- a/stdlib/source/test/lux/macro/poly/equivalence.lux +++ b/stdlib/source/test/lux/macro/poly/equivalence.lux @@ -41,43 +41,43 @@ #tuple [Int Frac Text] #recursive Recursive}) -(def: gen-recursive +(def: gen_recursive (Random Recursive) - (random.rec (function (_ gen-recursive) - (random.or random.safe-frac - (random.and random.safe-frac - gen-recursive))))) + (random.rec (function (_ gen_recursive) + (random.or random.safe_frac + (random.and random.safe_frac + gen_recursive))))) -(def: gen-record +(def: gen_record (Random Record) (do {! random.monad} [size (\ ! map (n.% 2) random.nat) - #let [gen-int (|> random.int (\ ! map (|>> i.abs (i.% +1,000,000))))]] + #let [gen_int (|> random.int (\ ! map (|>> i.abs (i.% +1,000,000))))]] ($_ random.and random.bit - gen-int - random.safe-frac + gen_int + random.safe_frac (random.unicode size) - (random.maybe gen-int) - (random.list size gen-int) + (random.maybe gen_int) + (random.list size gen_int) ($_ random.or random.bit - gen-int - random.safe-frac) + gen_int + random.safe_frac) ($_ random.and - gen-int - random.safe-frac + gen_int + random.safe_frac (random.unicode size)) - gen-recursive))) + gen_recursive))) (derived: equivalence (/.equivalence Record)) (def: #export test Test - (<| (_.context (%.name (name-of /._))) + (<| (_.context (%.name (name_of /._))) (do random.monad - [sample gen-record + [sample gen_record #let [(^open "/\.") ..equivalence]] (_.test "Every instance equals itself." (/\= sample sample))))) |