aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/macro/poly/equivalence.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-01-03 07:48:12 -0400
committerEduardo Julian2021-01-03 07:48:12 -0400
commitc03bd9f9787fb9f383c57b4ebb0fa9d49abbfaa1 (patch)
tree68a7f2f043eff00492ffe2b5e442bae98167a873 /stdlib/source/test/lux/macro/poly/equivalence.lux
parent02d27daeacac74785c2b0f4d1ce03d432377a36e (diff)
Place the "program:" macro of "lux/control/parser/cli" in its own module.
Diffstat (limited to 'stdlib/source/test/lux/macro/poly/equivalence.lux')
-rw-r--r--stdlib/source/test/lux/macro/poly/equivalence.lux16
1 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/source/test/lux/macro/poly/equivalence.lux b/stdlib/source/test/lux/macro/poly/equivalence.lux
index c1edf6022..593dba8e1 100644
--- a/stdlib/source/test/lux/macro/poly/equivalence.lux
+++ b/stdlib/source/test/lux/macro/poly/equivalence.lux
@@ -6,7 +6,10 @@
[monad (#+ do)]
[equivalence (#+ Equivalence)
{[0 #poly]
- ["." /]}]]
+ ["." /]}]
+ {[0 #spec]
+ [/
+ ["$." equivalence]]}]
[data
["." bit]
["." maybe]
@@ -48,7 +51,7 @@
(random.and random.safe_frac
gen_recursive)))))
-(def: gen_record
+(def: random
(Random Record)
(do {! random.monad}
[size (\ ! map (n.% 2) random.nat)
@@ -75,9 +78,6 @@
(def: #export test
Test
- (<| (_.context (%.name (name_of /._)))
- (do random.monad
- [sample gen_record
- #let [(^open "/\.") ..equivalence]]
- (_.test "Every instance equals itself."
- (/\= sample sample)))))
+ (<| (_.covering /._)
+ (_.for [/.equivalence]
+ ($equivalence.spec ..equivalence ..random))))