diff options
author | Carl Worth <cworth@cworth.org> | 2010-05-27 13:29:19 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-05-27 13:29:19 -0700 |
commit | a19297b26e971e5a9dbe00b4254931505da4b5a9 (patch) | |
tree | 81441fe0327023a2af8d679d9e5fe2f0f4c867b0 /tests | |
parent | a65cf7b1d29e98ef3bf31051df8a06cb394d131f (diff) |
Provide support for empty arguments in macro invocations.
For this we always add a new argument to the argument list as soon as
possible, without waiting until we see some argument token. This does
mean we need to take some extra care when comparing the number of
arguments with the number of expected arguments. In addition to
matching numbers, we also support one (empty) argument when zero
arguments are expected.
Add a test case here for this, which does pass.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/057-empty-arguments.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/057-empty-arguments.c b/tests/057-empty-arguments.c new file mode 100644 index 0000000000..6140232865 --- /dev/null +++ b/tests/057-empty-arguments.c @@ -0,0 +1,6 @@ +#define zero() success +zero() +#define one(x) success +one() +#define two(x,y) success +two(,) |