Debian Codegraph @

tests/corner.at

raw
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2 # Copyright (C) 2024-2025 Sergey Poznyakoff
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 3, or (at
7 # your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17 AT_BANNER([special cases])
18
19 CFLOW_OPT([-v],
20 [CFLOW_TEST([empty expression and closing brace],
21 [corner corner1],
22 [x = }],
23 [],
24 [prog:1: expected expression near `}'
25 ])
26 ])
27
28 CFLOW_OPT([-it -x],
29 [CFLOW_TEST([duplicate typedef],
30 [corner corner2],
31 [typedef struct X X;
32 typedef struct X { int i; } X;
33 ],
34 [X t prog:2
35 ])
36 ])