X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/blobdiff_plain/d5c6a2e654422894c528cda52e951739a6b66ae6..a41aa156f28753613f38924fc856d3dc992cfc56:/tests/decl-good.at?ds=sidebyside diff --git a/tests/decl-good.at b/tests/decl-good.at index df570c8..bb3c168 100644 --- a/tests/decl-good.at +++ b/tests/decl-good.at @@ -1,4 +1,4 @@ -# Copyright © 2020-2021, 2023 Nick Bowler +# Copyright © 2020-2021, 2023-2024 Nick Bowler # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -120,6 +120,22 @@ SIMPLE_DECLS( [[int @<:@n@:>@], [type variable-length array n of int]], [[int @<:@*@:>@], [type variable-length array of int]]) +SIMPLE_DECLS( + [[int f(a, b)], [declare f as function (a, b) returning int]], + [[int f(int, b)], [declare f as function (int, b) returning int]], + [[int f(a, int)], [declare f as function (a, int) returning int]], + [[int (a, b)], [type function (a, b) returning int]], + [[int (int, b)], [type function (int, b) returning int]], + [[int (a, int)], [type function (a, int) returning int]]) + +SIMPLE_DECLS( + [[int f(a, b, ...)], [declare f as function (a, b, ...) returning int]], + [[int f(int, b, ...)], [declare f as function (int, b, ...) returning int]], + [[int f(a, int, ...)], [declare f as function (a, int, ...) returning int]], + [[int (a, b, ...)], [type function (a, b, ...) returning int]], + [[int (int, b, ...)], [type function (int, b, ...) returning int]], + [[int (a, int, ...)], [type function (a, int, ...) returning 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)]],