aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2005-10-05 12:18:02 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2005-10-05 12:18:02 +0000
commitfe474867a224f45c585465261e742f67a81ee10b (patch)
tree3a06f925a3548f98f072c0b8d4b1ed6915d7e85d
parent3c5ca3b4f998e49a6c3cd167d944aeef38d7006b (diff)
downloadcflow-fe474867a224f45c585465261e742f67a81ee10b.tar.gz
cflow-fe474867a224f45c585465261e742f67a81ee10b.tar.bz2
Add new testcase
-rw-r--r--tests/Makefile.am3
-rw-r--r--tests/parm.at41
-rw-r--r--tests/testsuite.at1
3 files changed, 44 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0bd0354..067e706 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -52,7 +52,8 @@ TESTSUITE_AT = \
fdecl.at\
include.at\
ssblock.at\
- funcarg.at
+ funcarg.at\
+ parm.at
TESTSUITE = $(srcdir)/testsuite
diff --git a/tests/parm.at b/tests/parm.at
new file mode 100644
index 0000000..b509094
--- /dev/null
+++ b/tests/parm.at
@@ -0,0 +1,41 @@
+# This file is part of GNU cflow testsuite. -*- Autotest -*-
+# Copyright (C) 2005 Sergey Poznyakoff
+#
+# 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 2, 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA.
+
+AT_SETUP([Function parameter handling])
+AT_KEYWORDS([parm param])
+
+CFLOW_OPT([-ix -v],[
+CFLOW_CHECK([
+int bar;
+/* This declaration used to shadow the global in
+ pre-1.0 versions */
+int (*foo) (int bar);
+
+int
+main()
+{
+ bar = 1;
+}
+],
+[main() <int main () at prog:8>:
+ bar <int bar at prog:2>])
+])
+
+AT_CLEANUP
+
+
diff --git a/tests/testsuite.at b/tests/testsuite.at
index e5d3d2f..8dae8ff 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -60,5 +60,6 @@ m4_include([fdecl.at])
m4_include([include.at])
m4_include([ssblock.at])
m4_include([funcarg.at])
+m4_include([parm.at])
# End of testsuite.at

Return to:

Send suggestions and report system problems to the System administrator.