diff options
Diffstat (limited to 'spec/lib/builtins')
| -rw-r--r-- | spec/lib/builtins/cond_spec.moon | 10 | ||||
| -rw-r--r-- | spec/lib/builtins/literal_spec.moon | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/spec/lib/builtins/cond_spec.moon b/spec/lib/builtins/cond_spec.moon index 04c56ef..b075f8b 100644 --- a/spec/lib/builtins/cond_spec.moon +++ b/spec/lib/builtins/cond_spec.moon @@ -5,7 +5,7 @@ describe "if", -> COPILOT = TestPilot! it "checks truthiness", -> - for truthy in *{'true', '1', '-1', '1234', '(array 1 2 3)', '"test"', '""'} + for truthy in *{'true', '1', '-1', '1234', '[1 2 3]', '"test"', '""'} with COPILOT\eval_once "(if #{truthy} 'yes' 'no')" assert.is.true \is_const! assert.is.equal 'yes', .result! @@ -41,7 +41,7 @@ describe "if", -> it "forwards any result", -> with COPILOT\eval_once ' (import* time) - (if true (every 1 (array 1 2 3)))' + (if true (every 1 [1 2 3]))' assert.is.false \is_const! assert.is.equal '<num[3]! nil>', tostring .result @@ -49,7 +49,7 @@ describe "when", -> COPILOT = TestPilot! it "checks truthiness", -> - for truthy in *{'true', '1', '-1', '1234', '(array 1 2 3)', '"test"', '""'} + for truthy in *{'true', '1', '-1', '1234', '[1 2 3]', '"test"', '""'} with COPILOT\eval_once "(when #{truthy} 'yes')" assert.is.true \is_const! assert.is.equal 'yes', .result! @@ -81,12 +81,12 @@ describe "when", -> with COPILOT\eval_once ' (import* time) (when true - (every 1 (array 1 2 3)) + (every 1 [1 2 3]) 1 2 3)' assert.is.false \is_const! assert.is.equal '<num~ 3>', tostring .result - with COPILOT\eval_once '(when true (array 1 2 3))' + with COPILOT\eval_once '(when true [1 2 3])' assert.is.true \is_const! assert.is.equal '<num[3]= [1 2 3]>', tostring .result diff --git a/spec/lib/builtins/literal_spec.moon b/spec/lib/builtins/literal_spec.moon index 3db010d..61a9b90 100644 --- a/spec/lib/builtins/literal_spec.moon +++ b/spec/lib/builtins/literal_spec.moon @@ -6,8 +6,8 @@ describe "literal", -> (def str "hello" num 2 bool true - curl ([5]struct "a" 2 "b" false) - sqre ([7]array 1 2 3 4)) + curl {"a" 2 "b" false} + sqre [1 2 3 4]) (export*)' assert.is.true COPILOT.active_module.root\is_const! |
