From: Nick Bowler Date: Fri, 21 Jul 2023 03:55:46 +0000 (-0400) Subject: tests: Add sanity test for variable-length arrays. X-Git-Tag: v1.3~102 X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/commitdiff_plain/b898202c175f8502d9cb552f3ab784c8f8677a27 tests: Add sanity test for variable-length arrays. The random crossparse test generates these quite frequently but it's nice to have the basics covered by simpler inputs. --- diff --git a/tests/decl-good.at b/tests/decl-good.at index e06fb76..79cc6f9 100644 --- a/tests/decl-good.at +++ b/tests/decl-good.at @@ -96,6 +96,12 @@ SIMPLE_DECLS( [[int x@<:@@:>@], [declare x as array of int]], [[int @<:@@:>@], [type array of int]]) +SIMPLE_DECLS( + [[int x@<:@n@:>@], [declare x as variable-length array n of int]], + [[int x@<:@*@:>@], [declare x as variable-length array of int]], + [[int @<:@n@:>@], [type variable-length array n of int]], + [[int @<:@*@:>@], [type variable-length array of int]]) + SIMPLE_DECLS_EXPLAIN( [[int ((int))], [type function (int) returning int], [int (int)]], [[int (x(int))], [declare x as function (int) returning int], [int x(int)]],