From dd64edd58fe25ec74ae5958128cf3f74b0692f3b Mon Sep 17 00:00:00 2001 From: Li Jin Date: Wed, 28 Jan 2026 18:43:14 +0800 Subject: Fixed compiler issues and added 800+ test cases. --- spec/inputs/test/const_attribute_spec.yue | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'spec/inputs/test/const_attribute_spec.yue') diff --git a/spec/inputs/test/const_attribute_spec.yue b/spec/inputs/test/const_attribute_spec.yue index e3cc638..24ced21 100644 --- a/spec/inputs/test/const_attribute_spec.yue +++ b/spec/inputs/test/const_attribute_spec.yue @@ -13,7 +13,7 @@ describe "const attribute", -> assert.same name, "test" it "should support const with destructuring", -> - tb = {a: 1, b: 2, c: 3, d: 4} + tb = {a: 1, b: 2, 3, 4} const {:a, :b, c, d} = tb assert.same a, 1 assert.same b, 2 @@ -46,7 +46,7 @@ describe "const attribute", -> it "should handle const functions", -> const add = (a, b) -> a + b - assert.same add 5, 10, 15 + assert.same add(5, 10), 15 it "should work with const tables", -> const config = { @@ -74,28 +74,12 @@ describe "const attribute", -> const calculated = 10 + 20 assert.same calculated, 30 - it "should support const with prefixed return", -> - getDefault: const "default" -> - return nil - - result = getDefault! - assert.same result, nil - it "should work in table comprehension", -> const multiplier = 2 items = [1, 2, 3] result = [item * multiplier for item in *items] assert.same result, {2, 4, 6} - it "should handle const with fat arrow", -> - obj = - value: 100 - getValue: const => - @value - - result = obj\getValue! - assert.same result, 100 - it "should work with complex expressions", -> const complex = { data: [1, 2, 3] -- cgit v1.2.3-55-g6feb