aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test/test/luxc/synthesizer/structure.lux
diff options
context:
space:
mode:
authorEduardo Julian2017-06-27 17:52:52 -0400
committerEduardo Julian2017-06-27 17:52:52 -0400
commit36cf0c61991bda395e224fa2d435fa6b6f5090e5 (patch)
tree50216b0052b413dd7dff04a980e6f238cec98984 /new-luxc/test/test/luxc/synthesizer/structure.lux
parent49fab71f7965e4c76796d5b4ce9648fc46ab2660 (diff)
- Adapted compiler to the latest stdlib changes.
Diffstat (limited to 'new-luxc/test/test/luxc/synthesizer/structure.lux')
-rw-r--r--new-luxc/test/test/luxc/synthesizer/structure.lux38
1 files changed, 19 insertions, 19 deletions
diff --git a/new-luxc/test/test/luxc/synthesizer/structure.lux b/new-luxc/test/test/luxc/synthesizer/structure.lux
index 3f90bf321..eba24213e 100644
--- a/new-luxc/test/test/luxc/synthesizer/structure.lux
+++ b/new-luxc/test/test/luxc/synthesizer/structure.lux
@@ -13,33 +13,33 @@
[synthesizer])
(.. common))
-(test: "Variants"
+(context: "Variants"
[size (|> r;nat (:: @ map (|>. (n.% +10) (n.max +2))))
tagA (|> r;nat (:: @ map (n.% size)))
memberA gen-primitive]
($_ seq
- (assert "Can synthesize variants."
- (|> (synthesizer;synthesize (la;sum tagA size +0 memberA))
- (case> (#ls;Variant tagS last?S memberS)
- (and (n.= tagA tagS)
- (B/= (n.= (n.dec size) tagA)
- last?S)
- (corresponds? memberA memberS))
-
- _
- false)))
+ (test "Can synthesize variants."
+ (|> (synthesizer;synthesize (la;sum tagA size +0 memberA))
+ (case> (#ls;Variant tagS last?S memberS)
+ (and (n.= tagA tagS)
+ (B/= (n.= (n.dec size) tagA)
+ last?S)
+ (corresponds? memberA memberS))
+
+ _
+ false)))
))
-(test: "Tuples"
+(context: "Tuples"
[size (|> r;nat (:: @ map (|>. (n.% +10) (n.max +2))))
membersA (r;list size gen-primitive)]
($_ seq
- (assert "Can synthesize tuple."
- (|> (synthesizer;synthesize (la;product membersA))
- (case> (#ls;Tuple membersS)
- (and (n.= size (list;size membersS))
- (list;every? (product;uncurry corresponds?) (list;zip2 membersA membersS)))
+ (test "Can synthesize tuple."
+ (|> (synthesizer;synthesize (la;product membersA))
+ (case> (#ls;Tuple membersS)
+ (and (n.= size (list;size membersS))
+ (list;every? (product;uncurry corresponds?) (list;zip2 membersA membersS)))
- _
- false)))
+ _
+ false)))
))