From b898202c175f8502d9cb552f3ab784c8f8677a27 Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Thu, 20 Jul 2023 23:55:46 -0400 Subject: [PATCH] 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. --- tests/decl-good.at | 6 ++++++ 1 file changed, 6 insertions(+) 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)]], -- 2.43.2