aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/9-appendix-b
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-14 17:09:14 +0330
committerGravatar zinc <zinc@downsta.ir> 2026-10-14 17:09:14 +0330
commitf1eba8ef04e8902d7b797d9421d3e0c6f0045ae0 (patch)
tree159dd6fc86dbb3dfc0381f109681751085011c77 /tests/conformance/9-appendix-b
parentmerge work/xref: zc0 u*d redo and follow-ups (diff)
parentMerge branch 'main' into work/spec (diff)
merge work/spec: appendix b round, zc0umd rewrite
Diffstat (limited to 'tests/conformance/9-appendix-b')
-rw-r--r--tests/conformance/9-appendix-b/b2_11_unterminated_comment.zc2
-rw-r--r--tests/conformance/9-appendix-b/b2_12_as_int_star.zc6
-rw-r--r--tests/conformance/9-appendix-b/b2_14_len_char_ptr_typecheck_off.zc4
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/conformance/9-appendix-b/b2_11_unterminated_comment.zc b/tests/conformance/9-appendix-b/b2_11_unterminated_comment.zc
index e6e6bbf..ce4b236 100644
--- a/tests/conformance/9-appendix-b/b2_11_unterminated_comment.zc
+++ b/tests/conformance/9-appendix-b/b2_11_unterminated_comment.zc
@@ -1,4 +1,4 @@
-// expect error: unterminated
+// expect error: unterminated comment
// spec appendix b.2.11: an unterminated /* is accepted silently
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
diff --git a/tests/conformance/9-appendix-b/b2_12_as_int_star.zc b/tests/conformance/9-appendix-b/b2_12_as_int_star.zc
index fc12792..da54802 100644
--- a/tests/conformance/9-appendix-b/b2_12_as_int_star.zc
+++ b/tests/conformance/9-appendix-b/b2_12_as_int_star.zc
@@ -1,6 +1,6 @@
-// expect: 6/
-// spec appendix b.2.12: x as int * y should multiply
+// expect error: expected ')', found 'y'
+// spec 3.2.3 and appendix b.2.12: the type after as is read greedily, so x as int * y reads int* and then fails; write (x as int) * y
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
fn main() { int x = 2; int y = 3; pn(x as int * y); return 0; }
-// zc0: skip
+// zc0: error
diff --git a/tests/conformance/9-appendix-b/b2_14_len_char_ptr_typecheck_off.zc b/tests/conformance/9-appendix-b/b2_14_len_char_ptr_typecheck_off.zc
index b0d0d45..0953328 100644
--- a/tests/conformance/9-appendix-b/b2_14_len_char_ptr_typecheck_off.zc
+++ b/tests/conformance/9-appendix-b/b2_14_len_char_ptr_typecheck_off.zc
@@ -1,5 +1,5 @@
-// expect: 3/
-// spec appendix b.2.14: len(char*) with typecheck off returns word 0
+// expect error: len needs an array, not a char*
+// spec 3.13.5 and appendix b.2.14: len on a char* is an error with typecheck off too
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
typecheck off;