diff options
author | Eduardo Julian | 2017-10-21 00:38:55 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-10-21 00:38:55 -0400 |
commit | 0bc56fdc626ee601ca2c4ba0502f76e76d765fa0 (patch) | |
tree | 7abc9bfda606a0b861c9f2b33d9d949f217d8458 /new-luxc/test/test/luxc/synthesizer/structure.lux | |
parent | a564de58ec5c91c8069abc3848649a4a0cfd7956 (diff) |
- Updated new compiler to latest version of stdlib.
Diffstat (limited to 'new-luxc/test/test/luxc/synthesizer/structure.lux')
-rw-r--r-- | new-luxc/test/test/luxc/synthesizer/structure.lux | 56 |
1 files changed, 30 insertions, 26 deletions
diff --git a/new-luxc/test/test/luxc/synthesizer/structure.lux b/new-luxc/test/test/luxc/synthesizer/structure.lux index 8cc61d02f..441f422bb 100644 --- a/new-luxc/test/test/luxc/synthesizer/structure.lux +++ b/new-luxc/test/test/luxc/synthesizer/structure.lux @@ -14,32 +14,36 @@ (.. common)) (context: "Variants" - [size (|> r;nat (:: @ map (|>. (n.% +10) (n.max +2)))) - tagA (|> r;nat (:: @ map (n.% size))) - memberA gen-primitive] - ($_ seq - (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))) - )) + (<| (times +100) + (do @ + [size (|> r;nat (:: @ map (|>. (n.% +10) (n.max +2)))) + tagA (|> r;nat (:: @ map (n.% size))) + memberA gen-primitive] + ($_ seq + (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))) + )))) (context: "Tuples" - [size (|> r;nat (:: @ map (|>. (n.% +10) (n.max +2)))) - membersA (r;list size gen-primitive)] - ($_ seq - (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))) + (<| (times +100) + (do @ + [size (|> r;nat (:: @ map (|>. (n.% +10) (n.max +2)))) + membersA (r;list size gen-primitive)] + ($_ seq + (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))) + )))) |