glcpp: Add test for the #error directive.
authorCarl Worth <cworth@cworth.org>
Mon, 23 Aug 2010 15:54:06 +0000 (08:54 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 23 Aug 2010 17:48:10 +0000 (10:48 -0700)
This directive is already implemented nicely, but wasn't previously tested.
It will be convenient to use this directive in further tests that rely
on error messages, (such as ensuring that #line correctly sets the line
number in the error message).

src/glsl/glcpp/tests/090-hash-error.c [new file with mode: 0644]
src/glsl/glcpp/tests/090-hash-error.c.expected [new file with mode: 0644]

diff --git a/src/glsl/glcpp/tests/090-hash-error.c b/src/glsl/glcpp/tests/090-hash-error.c
new file mode 100644 (file)
index 0000000..d19bb7f
--- /dev/null
@@ -0,0 +1 @@
+#error human error
diff --git a/src/glsl/glcpp/tests/090-hash-error.c.expected b/src/glsl/glcpp/tests/090-hash-error.c.expected
new file mode 100644 (file)
index 0000000..f2f1fbe
--- /dev/null
@@ -0,0 +1,3 @@
+0:1(2): preprocessor error: #error human error
+
+