aboutsummaryrefslogtreecommitdiffstats
path: root/spec/lang/struct_spec.moon
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-08-19 14:45:31 +0000
committers-ol <s+removethis@s-ol.nu>2025-03-02 14:24:49 +0000
commit2bc0fe723d0f5cf2be5d84545b823dec0dbfb52b (patch)
treeba0ff0449d9f56b53e55b9d4b9ae2b68662d5073 /spec/lang/struct_spec.moon
parentadd (failing) struct spec (diff)
downloadalive-2bc0fe723d0f5cf2be5d84545b823dec0dbfb52b.tar.gz
alive-2bc0fe723d0f5cf2be5d84545b823dec0dbfb52b.zip
implement (set) as per spec
Diffstat (limited to 'spec/lang/struct_spec.moon')
-rw-r--r--spec/lang/struct_spec.moon4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/lang/struct_spec.moon b/spec/lang/struct_spec.moon
index 57c7e79..aa7b689 100644
--- a/spec/lang/struct_spec.moon
+++ b/spec/lang/struct_spec.moon
@@ -14,11 +14,11 @@ describe "struct", ->
it "cannot add members", ->
err = assert.has.error -> COPILOT\eval_once '(set (struct "a" 1) "b" 2)'
- assert.matches "argument error: TBD", err
+ assert.matches "{a: num} has no 'b' key", err
it "checks value type", ->
err = assert.has.error -> COPILOT\eval_once '(set (struct "a" 1) "a" "str")'
- assert.matches "argument error: TBD", err
+ assert.matches "expected value for key 'a' to be num, not str", err
describe "(get)", ->
it "can get values", ->