aboutsummaryrefslogtreecommitdiff
path: root/tests/test.sh
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-14 08:30:01 +0000
committerGravatar zinc <zinc@downsta.ir> 2026-10-14 08:30:01 +0000
commitd274751e89f75cc0f0e25c6e5e87ef91b64597ee (patch)
treeef76f2cfe9d2a09f3fe5d27278cf775649bc162f /tests/test.sh
parentlsp: quick fixes for hints and bare library names; comment cleanup (diff)
zc: untyped local const, c precedence for && and ||, import fixes for every module
const name = value; inside a function declares a local constant that takes the initializer's type. the let quick fix now writes a bare const. the self-hosted compiler bound || tighter than &&, unlike zc0 and the readme. no existing source mixed them without parentheses, so only new code was affected. missing-name diagnostics and their quick fixes now search every module: rt, core, run, loaded files, and std, icon and actor scanned from source, including static groups (std.Text.itoa). typos suggest module exports (putc -> rt.put_c) and get a change-to fix.
Diffstat (limited to 'tests/test.sh')
-rwxr-xr-xtests/test.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/test.sh b/tests/test.sh
index 449da87..031d6d9 100755
--- a/tests/test.sh
+++ b/tests/test.sh
@@ -109,6 +109,8 @@ run(){ # $1 = vm command, $2 = label
chk "$($vm < tests/programs/typeok.zc)" "14" "$l a program the typechecker accepts"
chk "$($vm < tests/programs/typeoff.zc)" "6" "$l the typechecker is off by default"
chk "$($vm < tests/programs/enhance.zc)" "100 0 343 3,2 5 -2 0" "$l virtual enhancements"
+ chk "$($vm < tests/programs/precedence.zc)" "1 1 1 1 1 1" "$l && binds tighter than ||, as in c"
+ chk "$($vm < tests/programs/const_local.zc)" "6 42 zc" "$l an untyped local const takes its initializer's type"
chk "$($vm < tests/programs/joins.zc)" "0 0 5 80 8 3 9 0" "$l joins free what one path gave away; switch, ?:, no prototypes"
chk "$($vm < tests/programs/buddy.zc)" "131072 262144 1 0" "$l buddy allocator merges freed blocks"
chk "$($vm < tests/programs/growheap.zc)" "144 1 7 1" "$l the heap grows past its initial size and a bigger block fits after the frees"