diff options
Diffstat (limited to 'new-luxc/test')
-rw-r--r-- | new-luxc/test/test/luxc/analyser/primitive.lux | 1 | ||||
-rw-r--r-- | new-luxc/test/test/luxc/analyser/procedure/common.lux | 26 | ||||
-rw-r--r-- | new-luxc/test/test/luxc/analyser/reference.lux | 6 |
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 [])) |