aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test
diff options
context:
space:
mode:
authorEduardo Julian2017-09-08 19:20:08 -0400
committerEduardo Julian2017-09-08 19:20:08 -0400
commitbe53e45ca4d75fa87a9029f84b95958e19a4b4fa (patch)
tree2312f9bf7adf028a08460264b0c6dcbc1f110b91 /new-luxc/test
parent06713336cdfd09db3eba26eda2c04db05bcd71e4 (diff)
- Re-named luxc/env to luxc/scope.
Diffstat (limited to '')
-rw-r--r--new-luxc/test/test/luxc/analyser/primitive.lux1
-rw-r--r--new-luxc/test/test/luxc/analyser/procedure/common.lux26
-rw-r--r--new-luxc/test/test/luxc/analyser/reference.lux6
3 files changed, 16 insertions, 17 deletions
diff --git a/new-luxc/test/test/luxc/analyser/primitive.lux b/new-luxc/test/test/luxc/analyser/primitive.lux
index 9c3c1acfe..e435ecca0 100644
--- a/new-luxc/test/test/luxc/analyser/primitive.lux
+++ b/new-luxc/test/test/luxc/analyser/primitive.lux
@@ -17,7 +17,6 @@
(macro [code])
test)
(luxc ["&" base]
- ["&;" env]
["&;" module]
(lang ["~" analysis])
[analyser]
diff --git a/new-luxc/test/test/luxc/analyser/procedure/common.lux b/new-luxc/test/test/luxc/analyser/procedure/common.lux
index 457363106..3947a738e 100644
--- a/new-luxc/test/test/luxc/analyser/procedure/common.lux
+++ b/new-luxc/test/test/luxc/analyser/procedure/common.lux
@@ -14,7 +14,7 @@
(macro [code])
test)
(luxc ["&" base]
- ["&;" env]
+ ["&;" scope]
["&;" module]
(lang ["~" analysis])
[analyser]
@@ -242,8 +242,8 @@
(test "Can create arrays."
(check-success+ "array new" (list sizeC) arrayT))
(test "Can get a value inside an array."
- (|> (&env;with-scope ""
- (&env;with-local [var-name arrayT]
+ (|> (&scope;with-scope ""
+ (&scope;with-local [var-name arrayT]
(&;with-expected-type elemT
(@;analyse-procedure analyse "array get"
(list idxC
@@ -255,8 +255,8 @@
(#R;Error _)
false)))
(test "Can put a value inside an array."
- (|> (&env;with-scope ""
- (&env;with-local [var-name arrayT]
+ (|> (&scope;with-scope ""
+ (&scope;with-local [var-name arrayT]
(&;with-expected-type arrayT
(@;analyse-procedure analyse "array put"
(list idxC
@@ -269,8 +269,8 @@
(#R;Error _)
false)))
(test "Can remove a value from an array."
- (|> (&env;with-scope ""
- (&env;with-local [var-name arrayT]
+ (|> (&scope;with-scope ""
+ (&scope;with-local [var-name arrayT]
(&;with-expected-type arrayT
(@;analyse-procedure analyse "array remove"
(list idxC
@@ -282,8 +282,8 @@
(#R;Error _)
false)))
(test "Can query the size of an array."
- (|> (&env;with-scope ""
- (&env;with-local [var-name arrayT]
+ (|> (&scope;with-scope ""
+ (&scope;with-local [var-name arrayT]
(&;with-expected-type Nat
(@;analyse-procedure analyse "array size"
(list (code;symbol ["" var-name]))))))
@@ -338,8 +338,8 @@
(test "Can create atomic reference."
(check-success+ "atom new" (list elemC) atomT))
(test "Can read the value of an atomic reference."
- (|> (&env;with-scope ""
- (&env;with-local [var-name atomT]
+ (|> (&scope;with-scope ""
+ (&scope;with-local [var-name atomT]
(&;with-expected-type elemT
(@;analyse-procedure analyse "atom read"
(list (code;symbol ["" var-name]))))))
@@ -350,8 +350,8 @@
(#R;Error _)
false)))
(test "Can swap the value of an atomic reference."
- (|> (&env;with-scope ""
- (&env;with-local [var-name atomT]
+ (|> (&scope;with-scope ""
+ (&scope;with-local [var-name atomT]
(&;with-expected-type Bool
(@;analyse-procedure analyse "atom compare-and-swap"
(list elemC
diff --git a/new-luxc/test/test/luxc/analyser/reference.lux b/new-luxc/test/test/luxc/analyser/reference.lux
index ef5479b64..5601318aa 100644
--- a/new-luxc/test/test/luxc/analyser/reference.lux
+++ b/new-luxc/test/test/luxc/analyser/reference.lux
@@ -8,7 +8,7 @@
[type "Type/" Eq<Type>]
[macro #+ Monad<Lux>]
test)
- (luxc ["&;" env]
+ (luxc ["&;" scope]
["&;" module]
(lang ["~" analysis])
[analyser]
@@ -24,8 +24,8 @@
var-name (r;text +5)]
($_ seq
(test "Can analyse variable."
- (|> (&env;with-scope scope-name
- (&env;with-local [var-name ref-type]
+ (|> (&scope;with-scope scope-name
+ (&scope;with-local [var-name ref-type]
(@common;with-unknown-type
(@;analyse-reference ["" var-name]))))
(macro;run (init-compiler []))