summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-05-13 12:54:17 -0700
committerCarl Worth <cworth@cworth.org>2010-05-14 09:53:50 -0700
commitaf71ba41bdecbe9f971752c32c514ca7b319f588 (patch)
treebc5717fd9642bb2d2a60c7f255cda159347ab3c0
parent48b94da0994b44e41324a2419117dcd81facce8b (diff)
Add tests exercising substitution of arguments in function-like macros.
This capability is the only thing that makes function-like macros interesting. This isn't supported yet so these tests fail for now.
-rw-r--r--tests/016-define-func-1-arg.c2
-rw-r--r--tests/017-define-func-2-args.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/016-define-func-1-arg.c b/tests/016-define-func-1-arg.c
new file mode 100644
index 0000000000..dea38d1fed
--- /dev/null
+++ b/tests/016-define-func-1-arg.c
@@ -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
index 0000000000..c725383527
--- /dev/null
+++ b/tests/017-define-func-2-args.c
@@ -0,0 +1,2 @@
+#define foo(x,y) ((x)*(y))
+foo(bar,baz)