Added more unit tests.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/errors/redefinition Thu Mar 04 23:08:13 2010 -0800
@@ -0,0 +1,2 @@
+#define x 1
+#define x 2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/errors/redefinition-file Thu Mar 04 23:08:13 2010 -0800
@@ -0,0 +1,1 @@
+#define __FILE__ 3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/errors/redefinition-file.correct Thu Mar 04 23:08:13 2010 -0800
@@ -0,0 +1,1 @@
+preprocessor/errors/redefinition-file:2: ERROR: '__FILE__' already defined
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/errors/redefinition-line Thu Mar 04 23:08:13 2010 -0800
@@ -0,0 +1,3 @@
+#define __LINE__ "wrong"
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/errors/redefinition-line.correct Thu Mar 04 23:08:13 2010 -0800
@@ -0,0 +1,1 @@
+preprocessor/errors/redefinition-line:2: ERROR: '__LINE__' already defined
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/errors/redefinition.correct Thu Mar 04 23:08:13 2010 -0800
@@ -0,0 +1,1 @@
+preprocessor/errors/redefinition:3: ERROR: 'x' already defined
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/errors/undef-file Thu Mar 04 23:08:13 2010 -0800
@@ -0,0 +1,1 @@
+#undef __FILE__
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/errors/undef-file-twice Thu Mar 04 23:08:13 2010 -0800
@@ -0,0 +1,4 @@
+// this should only produce one warning.
+#undef __FILE__
+#undef __FILE__
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/errors/undef-file-twice.correct Thu Mar 04 23:08:13 2010 -0800
@@ -0,0 +1,1 @@
+preprocessor/errors/undef-file-twice:3: ERROR: undefining "__FILE__"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/errors/undef-file.correct Thu Mar 04 23:08:13 2010 -0800
@@ -0,0 +1,1 @@
+preprocessor/errors/undef-file:1: ERROR: undefining "__FILE__"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/errors/undef-line Thu Mar 04 23:08:13 2010 -0800
@@ -0,0 +1,2 @@
+#undef __LINE__
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/errors/undef-line-twice Thu Mar 04 23:08:13 2010 -0800
@@ -0,0 +1,4 @@
+// this should only produce one warning.
+#undef __LINE__
+#undef __LINE__
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/errors/undef-line-twice.correct Thu Mar 04 23:08:13 2010 -0800
@@ -0,0 +1,1 @@
+preprocessor/errors/undef-line-twice:3: ERROR: undefining "__LINE__"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/unit_tests/preprocessor/errors/undef-line.correct Thu Mar 04 23:08:13 2010 -0800
@@ -0,0 +1,1 @@
+preprocessor/errors/undef-line:2: ERROR: undefining "__LINE__"