From 4abc3dec720933e78a266417cffb2ea7b16d497f Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 13 May 2010 09:34:21 -0700 Subject: [PATCH] Add tests for the structure of function-like macros. 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 | 2 ++ tests/012-define-func-no-args.c | 2 ++ tests/013-define-func-1-arg-unused.c | 2 ++ tests/014-define-func-2-arg-unused.c | 2 ++ 4 files changed, 8 insertions(+) create mode 100644 tests/011-define-func-empty.c create mode 100644 tests/012-define-func-no-args.c create mode 100644 tests/013-define-func-1-arg-unused.c create mode 100644 tests/014-define-func-2-arg-unused.c diff --git a/tests/011-define-func-empty.c b/tests/011-define-func-empty.c new file mode 100644 index 00000000000..d9ce13c2284 --- /dev/null +++ b/tests/011-define-func-empty.c @@ -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 index 00000000000..c2bb730b115 --- /dev/null +++ b/tests/012-define-func-no-args.c @@ -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 index 00000000000..f78fb8b118a --- /dev/null +++ b/tests/013-define-func-1-arg-unused.c @@ -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 index 00000000000..11feb2624b7 --- /dev/null +++ b/tests/014-define-func-2-arg-unused.c @@ -0,0 +1,2 @@ +#define foo(x,y) 1 +foo(bar,baz) -- 2.30.2