diff options
author | Carl Worth <cworth@cworth.org> | 2010-05-13 09:34:21 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-05-13 09:35:50 -0700 |
commit | 4abc3dec720933e78a266417cffb2ea7b16d497f (patch) | |
tree | 079b6c70c292fe43d7414277226250b26f630131 | |
parent | 9f62a7e9e25efd79ebf46c64166876436f88f08a (diff) |
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.
-rw-r--r-- | tests/011-define-func-empty.c | 2 | ||||
-rw-r--r-- | tests/012-define-func-no-args.c | 2 | ||||
-rw-r--r-- | tests/013-define-func-1-arg-unused.c | 2 | ||||
-rw-r--r-- | tests/014-define-func-2-arg-unused.c | 2 |
4 files changed, 8 insertions, 0 deletions
diff --git a/tests/011-define-func-empty.c b/tests/011-define-func-empty.c new file mode 100644 index 0000000000..d9ce13c228 --- /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 0000000000..c2bb730b11 --- /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 0000000000..f78fb8b118 --- /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 0000000000..11feb2624b --- /dev/null +++ b/tests/014-define-func-2-arg-unused.c @@ -0,0 +1,2 @@ +#define foo(x,y) 1 +foo(bar,baz) |