diff options
| author | s-ol <s+removethis@s-ol.nu> | 2022-01-27 15:35:18 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-03-02 14:24:49 +0000 |
| commit | 8b0ff802dbf2a45c9c1ce6d026bb1a646e709adf (patch) | |
| tree | 4945ceca327086ea96ad9b5b10e409b7c6d63aa7 /spec/lang/array_spec.moon | |
| parent | use base.match.any consistently (diff) | |
| download | alive-8b0ff802dbf2a45c9c1ce6d026bb1a646e709adf.tar.gz alive-8b0ff802dbf2a45c9c1ce6d026bb1a646e709adf.zip | |
clean up spec a bit
Diffstat (limited to 'spec/lang/array_spec.moon')
| -rw-r--r-- | spec/lang/array_spec.moon | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/lang/array_spec.moon b/spec/lang/array_spec.moon index f1fe0ab..b55cec6 100644 --- a/spec/lang/array_spec.moon +++ b/spec/lang/array_spec.moon @@ -1,5 +1,5 @@ import TestPilot from require 'spec.test_setup' -import T, Array, Constant from require 'alv' +import T, Array from require 'alv' describe "array", -> test = TestPilot '', '(import* array-)\n' @@ -41,7 +41,7 @@ describe "array", -> it "can get a value", -> rt = COPILOT\eval_once '(get (array 1 2) 0)' assert.is.true rt\is_const! - assert.is.equal (Constant.num 1), rt.result + assert.is.equal '<num= 1>', tostring rt.result it "checks index range", -> err = assert.has.error -> COPILOT\eval_once '(get (array 1 2) -1)' @@ -58,7 +58,7 @@ describe "array", -> it "can peek a value", -> rt = COPILOT\eval_once '(head (array 1 2))' assert.is.true rt\is_const! - assert.is.equal (Constant.num 1), rt.result + assert.is.equal '<num= 1>', tostring rt.result describe '(tail)', -> it "gets rest of an array", -> @@ -141,8 +141,8 @@ describe "array", -> it "size can be read using (size)", -> rt = COPILOT\eval_once '(size (array 1))' assert.is.true rt\is_const! - assert.is.equal (Constant.num 1), rt.result + assert.is.equal '<num= 1>', tostring rt.result rt = COPILOT\eval_once '(size (array 1 2 3))' assert.is.true rt\is_const! - assert.is.equal (Constant.num 3), rt.result + assert.is.equal '<num= 3>', tostring rt.result |
