X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/blobdiff_plain/57510b6e4963ad39846a4f4c7fbd4ce7145f426d..b36da52d0e7798814d23cdc9979fc1900f8e9e51:/tests/decl-good.at diff --git a/tests/decl-good.at b/tests/decl-good.at new file mode 100644 index 0000000..5b8b9a6 --- /dev/null +++ b/tests/decl-good.at @@ -0,0 +1,27 @@ +# Copyright © 2020 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 +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +AT_BANNER([C declarations]) + +m4_define([CHECK_DECL], +[AT_DATA([expout], [[$2]m4_newline]) +AT_CHECK([cdecl99 -e 'explain $1'], [0], [expout])]) + +m4_define([SIMPLE_DECL], +[AT_SETUP([$1]) +CHECK_DECL([$1], [$2]) +AT_CLEANUP]) + +SIMPLE_DECL([int (x*)], [type function (pointer to x) returning int])