Add tests for the structure of function-like macros.
authorCarl Worth <cworth@cworth.org>
Thu, 13 May 2010 16:34:21 +0000 (09:34 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 13 May 2010 16:35:50 +0000 (09:35 -0700)
These test only the most basic aspect of parsing of function-like
macros.  Specifically, none of the definitions of these function like
macros use the arguments of the function.

No function-like macros are implemented yet, so all of these fail for
now.

tests/011-define-func-empty.c [new file with mode: 0644]
tests/012-define-func-no-args.c [new file with mode: 0644]
tests/013-define-func-1-arg-unused.c [new file with mode: 0644]
tests/014-define-func-2-arg-unused.c [new file with mode: 0644]

diff --git a/tests/011-define-func-empty.c b/tests/011-define-func-empty.c
new file mode 100644 (file)
index 0000000..d9ce13c
--- /dev/null
@@ -0,0 +1,2 @@
+#define foo()
+foo()
diff --git a/tests/012-define-func-no-args.c b/tests/012-define-func-no-args.c
new file mode 100644 (file)
index 0000000..c2bb730
--- /dev/null
@@ -0,0 +1,2 @@
+#define foo() bar
+foo()
diff --git a/tests/013-define-func-1-arg-unused.c b/tests/013-define-func-1-arg-unused.c
new file mode 100644 (file)
index 0000000..f78fb8b
--- /dev/null
@@ -0,0 +1,2 @@
+#define foo(x) 1
+foo(bar)
diff --git a/tests/014-define-func-2-arg-unused.c b/tests/014-define-func-2-arg-unused.c
new file mode 100644 (file)
index 0000000..11feb26
--- /dev/null
@@ -0,0 +1,2 @@
+#define foo(x,y) 1
+foo(bar,baz)