From af71ba41bdecbe9f971752c32c514ca7b319f588 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 13 May 2010 12:54:17 -0700 Subject: [PATCH] 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. --- tests/016-define-func-1-arg.c | 2 ++ tests/017-define-func-2-args.c | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 tests/016-define-func-1-arg.c create mode 100644 tests/017-define-func-2-args.c diff --git a/tests/016-define-func-1-arg.c b/tests/016-define-func-1-arg.c new file mode 100644 index 00000000000..dea38d1fedd --- /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 00000000000..c7253835278 --- /dev/null +++ b/tests/017-define-func-2-args.c @@ -0,0 +1,2 @@ +#define foo(x,y) ((x)*(y)) +foo(bar,baz) -- 2.30.2