aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/test')
-rw-r--r--new-luxc/test/test/luxc/analyser/procedure/common.lux17
1 files changed, 9 insertions, 8 deletions
diff --git a/new-luxc/test/test/luxc/analyser/procedure/common.lux b/new-luxc/test/test/luxc/analyser/procedure/common.lux
index 208076d6e..8649de3d7 100644
--- a/new-luxc/test/test/luxc/analyser/procedure/common.lux
+++ b/new-luxc/test/test/luxc/analyser/procedure/common.lux
@@ -26,13 +26,14 @@
(do-template [<name> <success> <failure>]
[(def: (<name> procedure params output-type)
(-> Text (List Code) Type Bool)
- (|> (&;with-expected-type output-type
- (@;analyse-procedure analyse procedure params))
+ (|> (&;with-scope
+ (&;with-expected-type output-type
+ (@;analyse-procedure analyse procedure params)))
(meta;run (init-compiler []))
(case> (#e;Success _)
<success>
- (#e;Error _)
+ (#e;Error error)
<failure>)))]
[check-success+ true false]
@@ -52,7 +53,7 @@
(check-failure+ "lux is" (list primC antiC) Bool))
(test "Can 'try' risky IO computations."
(check-success+ "lux try"
- (list (` ((~' _lux_function) (~' _) (~' _) (~ primC))))
+ (list (` ("lux function" (~' _) (~' _) (~ primC))))
(type (Either Text primT))))
))))
@@ -169,7 +170,7 @@
(test "Can scale degree."
(check-success+ "lux deg scale" (list subjectC natC) Deg))
(test "Can calculate the reciprocal of a natural number."
- (check-success+ "lux deg reciprocal" (list natC) Deg))
+ (check-success+ "lux deg reciprocal" (list subjectC natC) Deg))
))))
(context: "Frac procedures"
@@ -212,7 +213,7 @@
(test "Can convert frac number to text."
(check-success+ "lux frac encode" (list subjectC) Text))
(test "Can convert text to frac number."
- (check-success+ "lux frac encode" (list encodedC) (type (Maybe Frac))))
+ (check-success+ "lux frac decode" (list encodedC) (type (Maybe Frac))))
))))
(context: "Text procedures"
@@ -395,12 +396,12 @@
(check-success+ "lux process concurrency-level" (list) Nat))
(test "Can run an IO computation concurrently."
(check-success+ "lux process future"
- (list (` ((~' _lux_function) (~' _) (~' _) (~ primC))))
+ (list (` ("lux function" (~' _) (~' _) (~ primC))))
Unit))
(test "Can schedule an IO computation to run concurrently at some future time."
(check-success+ "lux process schedule"
(list timeC
- (` ((~' _lux_function) (~' _) (~' _) (~ primC))))
+ (` ("lux function" (~' _) (~' _) (~ primC))))
Unit))
))))