aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test/test/luxc/synthesizer/primitive.lux
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/test/test/luxc/synthesizer/primitive.lux')
-rw-r--r--new-luxc/test/test/luxc/synthesizer/primitive.lux38
1 files changed, 21 insertions, 17 deletions
diff --git a/new-luxc/test/test/luxc/synthesizer/primitive.lux b/new-luxc/test/test/luxc/synthesizer/primitive.lux
index a7fb6913e..e8484697d 100644
--- a/new-luxc/test/test/luxc/synthesizer/primitive.lux
+++ b/new-luxc/test/test/luxc/synthesizer/primitive.lux
@@ -20,22 +20,26 @@
%deg% r;deg
%frac% r;frac
%text% (r;text +5)]
- (with-expansions
- [<tests> (do-template [<desc> <analysis> <synthesis> <sample>]
- [(test (format "Can synthesize " <desc> ".")
- (|> (synthesizer;synthesize (<analysis> <sample>))
- (case> (<synthesis> value)
- (is <sample> value)
+ (`` ($_ seq
+ (test (format "Can synthesize unit.")
+ (|> (synthesizer;synthesize (#la;Unit []))
+ (case> [_ (#;Tuple #;Nil)]
+ true
- _
- false)))]
+ _
+ false)))
+ (~~ (do-template [<desc> <analysis> <synthesis> <sample>]
+ [(test (format "Can synthesize " <desc> ".")
+ (|> (synthesizer;synthesize (<analysis> <sample>))
+ (case> [_ (<synthesis> value)]
+ (is <sample> value)
- ["unit" #la;Unit #ls;Unit []]
- ["bool" #la;Bool #ls;Bool %bool%]
- ["nat" #la;Nat #ls;Nat %nat%]
- ["int" #la;Int #ls;Int %int%]
- ["deg" #la;Deg #ls;Deg %deg%]
- ["frac" #la;Frac #ls;Frac %frac%]
- ["text" #la;Text #ls;Text %text%])]
- ($_ seq
- <tests>)))))
+ _
+ false)))]
+
+ ["bool" #la;Bool #;Bool %bool%]
+ ["nat" #la;Nat #;Nat %nat%]
+ ["int" #la;Int #;Int %int%]
+ ["deg" #la;Deg #;Deg %deg%]
+ ["frac" #la;Frac #;Frac %frac%]
+ ["text" #la;Text #;Text %text%])))))))