From 2fe2873a4efa6501b3cb5bbd69497d630850da28 Mon Sep 17 00:00:00 2001 From: s-ol Date: Thu, 20 Aug 2020 14:13:45 +0200 Subject: dirty (insert) implementation --- spec/lang/array_spec.moon | 2 +- spec/lang/struct_spec.moon | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'spec') diff --git a/spec/lang/array_spec.moon b/spec/lang/array_spec.moon index 25c0167..2dd2894 100644 --- a/spec/lang/array_spec.moon +++ b/spec/lang/array_spec.moon @@ -83,7 +83,7 @@ describe "array", -> assert.is.true rt\is_const! assert.is.equal svec3\mk_const({ 'a', 'b', 'c' }), rt.result - rt = COPILOT\eval_once '(insert (array "a" "b") 1 "c")' + rt = COPILOT\eval_once '(insert (array "a" "b") 2 "c")' assert.is.true rt\is_const! assert.is.equal svec3\mk_const({ 'a', 'b', 'c' }), rt.result diff --git a/spec/lang/struct_spec.moon b/spec/lang/struct_spec.moon index aa7b689..9d2286e 100644 --- a/spec/lang/struct_spec.moon +++ b/spec/lang/struct_spec.moon @@ -38,7 +38,7 @@ describe "struct", -> it "doesn't clobber existing members", -> err = assert.has.error -> COPILOT\eval_once '(insert (struct "a" 1) "a" 2)' - assert.matches "TBD", err + assert.matches "key 'a' already exists in value of type {a: num}", err describe "(remove)", -> it "can remove members", -> -- cgit v1.2.3