diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/conformance/5-declarations/global_names_global_b8.zc | 2 | ||||
| -rw-r--r-- | tests/conformance/known.txt | 3 | ||||
| -rwxr-xr-x | tests/test.sh | 11 |
3 files changed, 10 insertions, 6 deletions
diff --git a/tests/conformance/5-declarations/global_names_global_b8.zc b/tests/conformance/5-declarations/global_names_global_b8.zc index 7d678eb..6e11713 100644 --- a/tests/conformance/5-declarations/global_names_global_b8.zc +++ b/tests/conformance/5-declarations/global_names_global_b8.zc @@ -1,5 +1,5 @@ // expect: 1/ -// spec 5.3.2 and 3.14.2: a global named in an initializer is its address (appendix b.2.8 calls this a bug) +// spec 5.3.2 and 3.14.2: a global named in an initializer is its address (documented behavior: the spec wins over appendix b.2.8) include rt; void pn(int x) { rt.put_n(x); rt.put_c(10); } int a = 5; int b = a + 1; diff --git a/tests/conformance/known.txt b/tests/conformance/known.txt index fdcb7af..13ef43c 100644 --- a/tests/conformance/known.txt +++ b/tests/conformance/known.txt @@ -1,5 +1,6 @@ # understood conformance failures: PATH IMPL CLASS reason # class a: self-hosted compiler bug; b: zc0 deviation (appendix a/b); c: spec issue to settle +# appendix b.2.8 (a global named in an initializer is its address) is documented behavior per 5.3.2 and 3.14.2: no entry 4-statements/o3_outside_function_ordinary_block.zc zy c top-level o3 { } is rejected; spec 4.10.2 says it is an ordinary block 5-declarations/enum_member_names_earlier_b2.zc zy a appendix b.2.2 confirmed: enum members can't name earlier members 5-declarations/fn_prototype_after_definition_b4.zc zy a appendix b.2.4 confirmed: a prototype after the definition hides it @@ -15,7 +16,7 @@ 9-appendix-b/b2_14_len_char_ptr_typecheck_off.zc zy a appendix b.2.14 confirmed 9-appendix-b/b2_15_duplicate_case.zc zy c appendix b.2.15 confirmed; 4.7.2 says duplicates are allowed 9-appendix-b/b2_16_local_const_in_const_expr.zc zy c appendix b.2.16 confirmed; 3.14.2 documents it -1-source/ident_tags_as_variables_glued_star.zc zc0 b recast u*d emits no code (same misparse as zy) +1-source/ident_tags_as_variables_glued_star.zc zc0 b u*d with visible u and d is read as a recast (no code); zy follows 1.6.3 1-source/lit_hex.zc zc0 b literals read with strtoll base 0: octal and saturation (appendix b.1.11) 1-source/lit_hex_wide.zc zc0 b literals read with strtoll base 0: octal and saturation (appendix b.1.11) 1-source/lit_hex_wraps.zc zc0 b literals read with strtoll base 0: octal and saturation (appendix b.1.11) diff --git a/tests/test.sh b/tests/test.sh index d6d8f06..07fff37 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -231,10 +231,13 @@ s_interp() { T=$ROOT/interp $CC -pthread -O2 -w -fwrapv -DJTYPE=int src/core/core.c src/core/io_linux.c $GI -o $T/zy run $T/zy "interp" - # docs/SPEC.md conformance programs; failures listed in tests/conformance/known.txt do not count - bash tests/conformance/run.sh --zy $T/zy -w $T/conformance -q > $T/conformance.out 2>&1; r=$? - grep '^FAIL' $T/conformance.out - chk $r 0 "interp conformance suite: $(grep '^ total' $T/conformance.out | sed 's/ */ /g')" + # docs/SPEC.md conformance programs; failures listed in tests/conformance/known.txt do not count. + # not in the quick path (-q, make check): it takes about half a minute + if [ $QUICK = 0 ]; then + bash tests/conformance/run.sh --zy $T/zy -w $T/conformance -q > $T/conformance.out 2>&1; r=$? + grep '^FAIL' $T/conformance.out + chk $r 0 "interp conformance suite: $(grep '^ total' $T/conformance.out | sed 's/ */ /g')" + fi python3 tests/drivers/array_methods_test.py $T/zy > $T/arrays.out 2>&1; r=$? grep -v '^ok' $T/arrays.out chk $r 0 "native array receiver, algorithm and ownership contracts" |
