Debian Codegraph @

tests/reverse.at

raw
1 # This file is part of GNU cflow testsuite. -*- Autotest -*-
2 # Copyright (C) 2005-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_SETUP([reverse tree])
18 AT_KEYWORDS([reverse])
19
20 CFLOW_OPT([-r], [
21
22 CFLOW_CHECK([
23 foo()
24 {
25 }
26
27 bar()
28 {
29 foo();
30 }
31
32 main()
33 {
34 bar();
35 foo();
36 }
37 ],
38 [bar() <bar () at prog:6>:
39 main() <main () at prog:11>
40 foo() <foo () at prog:2>:
41 bar() <bar () at prog:6>:
42 main() <main () at prog:11>
43 main() <main () at prog:11>
44 main() <main () at prog:11>
45 ])])
46
47 AT_CLEANUP
48