X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/blobdiff_plain/438fd434fd51cc2bd17bbdc8a2eb945493a6baa7..c5810975e3ec971fc8caf65f58b77c96c97b2571:/tests/decl-good.at diff --git a/tests/decl-good.at b/tests/decl-good.at index 8acf26a..e06fb76 100644 --- a/tests/decl-good.at +++ b/tests/decl-good.at @@ -95,3 +95,20 @@ SIMPLE_DECLS( SIMPLE_DECLS( [[int x@<:@@:>@], [declare x as array of int]], [[int @<:@@:>@], [type 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)]], + [[int (())], [type function returning int], [int ()]]) + +SIMPLE_DECLS_EXPLAIN( + [[int (x())], [declare x as function returning int], [int x()]], + [[int ((x)())], [declare x as function returning int], [int x()]]) + +dnl Test that english-only keywords are not rejected as idenfitiers in C mode. +SIMPLE_DECLS_EXPLAIN( + [[of array@<:@@:>@], [declare array as array of of]], + [[returning as(function)], + [declare as as function (function) returning returning]], + [[pointer *declare], [declare declare as pointer to pointer]], + [[type to], [declare to as type]])