glsl/glcpp: Add test for "#define without macro name"
authorCarl Worth <cworth@cworth.org>
Wed, 2 Jul 2014 00:44:55 +0000 (17:44 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 7 Aug 2014 23:08:28 +0000 (16:08 -0700)
This ensures that the previous commit indeed generates the expected error
message when a "#define" directive is not followed by anything except for a
newline.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/glcpp/tests/139-define-without-macro-name.c [new file with mode: 0644]
src/glsl/glcpp/tests/139-define-without-macro-name.c.expected [new file with mode: 0644]

diff --git a/src/glsl/glcpp/tests/139-define-without-macro-name.c b/src/glsl/glcpp/tests/139-define-without-macro-name.c
new file mode 100644 (file)
index 0000000..de3ed98
--- /dev/null
@@ -0,0 +1,2 @@
+#define
+Error expected because no macro name is ever given!
diff --git a/src/glsl/glcpp/tests/139-define-without-macro-name.c.expected b/src/glsl/glcpp/tests/139-define-without-macro-name.c.expected
new file mode 100644 (file)
index 0000000..000aeaf
--- /dev/null
@@ -0,0 +1,2 @@
+0:1(1): preprocessor error: #define without macro name
+Error expected because no macro name is ever given!