More preprocessor unit tests.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 09 Apr 2009 01:54:52 -0400
changeset 745 a8013b76a727
parent 744 3caeec412bc3
child 746 6b368eeaa3fc
More preprocessor unit tests.
unit_tests/preprocessor/output/macro-arg
unit_tests/preprocessor/output/macro-arg.correct
unit_tests/preprocessor/output/macro-args
unit_tests/preprocessor/output/macro-args.correct
unit_tests/preprocessor/output/macro-empty-arg
unit_tests/preprocessor/output/macro-empty-arg.correct
unit_tests/preprocessor/output/macro-void-arg
unit_tests/preprocessor/output/macro-void-arg.correct
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/output/macro-arg	Thu Apr 09 01:54:52 2009 -0400
@@ -0,0 +1,4 @@
+/* This should produce "RIGHT" instead of "WRONG" */
+#define x(WRONG) WRONG
+x(RIGHT)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/output/macro-arg.correct	Thu Apr 09 01:54:52 2009 -0400
@@ -0,0 +1,1 @@
+RIGHT
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/output/macro-args	Thu Apr 09 01:54:52 2009 -0400
@@ -0,0 +1,4 @@
+/* This should produce "RIGHT ANDRIGHT" instead of "WRONG ANDWRONG" */
+#define x(WRONG, ANDWRONG) WRONG ANDWRONG
+x(RIGHT, ANDRIGHT)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/output/macro-args.correct	Thu Apr 09 01:54:52 2009 -0400
@@ -0,0 +1,1 @@
+RIGHT ANDRIGHT
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/output/macro-empty-arg	Thu Apr 09 01:54:52 2009 -0400
@@ -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(,)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/output/macro-empty-arg.correct	Thu Apr 09 01:54:52 2009 -0400
@@ -0,0 +1,1 @@
+RIGHT RIGHT
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/output/macro-void-arg	Thu Apr 09 01:54:52 2009 -0400
@@ -0,0 +1,3 @@
+/* This should not trigger a preprocessor error. */
+#define x() RIGHT
+x()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/output/macro-void-arg.correct	Thu Apr 09 01:54:52 2009 -0400
@@ -0,0 +1,1 @@
+RIGHT
\ No newline at end of file