Add tests exercising substitution of arguments in function-like macros.
authorCarl Worth <cworth@cworth.org>
Thu, 13 May 2010 19:54:17 +0000 (12:54 -0700)
committerCarl Worth <cworth@cworth.org>
Fri, 14 May 2010 16:53:50 +0000 (09:53 -0700)
This capability is the only thing that makes function-like macros
interesting. This isn't supported yet so these tests fail for now.

tests/016-define-func-1-arg.c [new file with mode: 0644]
tests/017-define-func-2-args.c [new file with mode: 0644]

diff --git a/tests/016-define-func-1-arg.c b/tests/016-define-func-1-arg.c
new file mode 100644 (file)
index 0000000..dea38d1
--- /dev/null
@@ -0,0 +1,2 @@
+#define foo(x) ((x) + 1)
+foo(bar)
diff --git a/tests/017-define-func-2-args.c b/tests/017-define-func-2-args.c
new file mode 100644 (file)
index 0000000..c725383
--- /dev/null
@@ -0,0 +1,2 @@
+#define foo(x,y) ((x)*(y))
+foo(bar,baz)