aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test/test/luxc/lang/translation/primitive.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--new-luxc/test/test/luxc/lang/translation/primitive.lux55
1 files changed, 30 insertions, 25 deletions
diff --git a/new-luxc/test/test/luxc/lang/translation/primitive.lux b/new-luxc/test/test/luxc/lang/translation/primitive.lux
index 14a887873..1c4236913 100644
--- a/new-luxc/test/test/luxc/lang/translation/primitive.lux
+++ b/new-luxc/test/test/luxc/lang/translation/primitive.lux
@@ -1,42 +1,47 @@
(.module:
- lux
- (lux [io #+ IO]
- (control [monad #+ do]
- pipe)
- (data text/format
- ["e" error]
- [bit "bit/" Eq<Bit>]
- [text "text/" Eq<Text>])
- ["r" math/random]
- (lang ["//." synthesis])
- test)
- (luxc (lang [".L" host]))
- (test/luxc common))
+ [lux #*
+ [control
+ [monad (#+ do)]
+ pipe]
+ [data
+ [error]
+ [bit ("bit/" Equivalence<Bit>)]
+ [text ("text/" Equivalence<Text>)
+ format]]
+ [math
+ ["r" random]]
+ [language
+ [compiler
+ [synthesis]]]
+ test]
+ [test
+ [luxc
+ common]])
(def: (spec run)
(-> Runner Test)
(do r.Monad<Random>
- [%bit% r.bit
- %nat% r.nat
- %int% r.int
- %rev% r.rev
- %frac% r.frac
- %text% (r.ascii +5)]
+ [|bit| r.bit
+ |nat| r.nat
+ |int| r.int
+ |rev| r.rev
+ |frac| r.frac
+ |text| (r.ascii +5)]
(`` ($_ seq
(~~ (do-template [<desc> <type> <synthesis> <sample> <test>]
[(test (format "Can translate " <desc> ".")
(|> (run (<synthesis> <sample>))
- (case> (#e.Success valueT)
+ (case> (#error.Success valueT)
(<test> <sample> (:coerce <type> valueT))
- (#e.Error error)
+ (#error.Error error)
(exec (log! error)
#0))))]
- ["bit" Bit //synthesis.bit %bit% bit/=]
- ["int" Int //synthesis.i64 %int% i/=]
- ["frac" Frac //synthesis.f64 %frac% f/=]
- ["text" Text //synthesis.text %text% text/=]))
+ ["bit" Bit synthesis.bit |bit| bit/=]
+ ["int" Int synthesis.i64 |int| i/=]
+ ["frac" Frac synthesis.f64 |frac| f/=]
+ ["text" Text synthesis.text |text| text/=]))
))))
(context: "[JVM] Primitives."