Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
More preprocessor unit tests.
  • Loading branch information
icculus committed Apr 9, 2009
1 parent 61d615a commit 3991032
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions unit_tests/preprocessor/output/macro-arg
@@ -0,0 +1,4 @@
/* This should produce "RIGHT" instead of "WRONG" */
#define x(WRONG) WRONG
x(RIGHT)

1 change: 1 addition & 0 deletions unit_tests/preprocessor/output/macro-arg.correct
@@ -0,0 +1 @@
RIGHT
4 changes: 4 additions & 0 deletions unit_tests/preprocessor/output/macro-args
@@ -0,0 +1,4 @@
/* This should produce "RIGHT ANDRIGHT" instead of "WRONG ANDWRONG" */
#define x(WRONG, ANDWRONG) WRONG ANDWRONG
x(RIGHT, ANDRIGHT)

1 change: 1 addition & 0 deletions unit_tests/preprocessor/output/macro-args.correct
@@ -0,0 +1 @@
RIGHT ANDRIGHT
5 changes: 5 additions & 0 deletions unit_tests/preprocessor/output/macro-empty-arg
@@ -0,0 +1,5 @@
/* This should produce "RIGHT RIGHT" instead of "WRONG WRONG" (etc) */
#define x(WRONG,ANDWRONG) WRONG ANDWRONG
x(RIGHT,)
x(,RIGHT)
x(,)
1 change: 1 addition & 0 deletions unit_tests/preprocessor/output/macro-empty-arg.correct
@@ -0,0 +1 @@
RIGHT RIGHT
3 changes: 3 additions & 0 deletions unit_tests/preprocessor/output/macro-void-arg
@@ -0,0 +1,3 @@
/* This should not trigger a preprocessor error. */
#define x() RIGHT
x()
1 change: 1 addition & 0 deletions unit_tests/preprocessor/output/macro-void-arg.correct
@@ -0,0 +1 @@
RIGHT

0 comments on commit 3991032

Please sign in to comment.