summaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2014-07-01 17:44:55 -0700
committerIan Romanick <ian.d.romanick@intel.com>2014-08-07 16:08:28 -0700
commitb76482e7312827ab13f37ab9a7e3c8eef30bfe7a (patch)
tree0044eeac8bda8870b6a2e8b7549c60bea1afa40c /src/glsl/glcpp
parenta196ab1f8aacf657e591a0a15c80c3f37b9496b0 (diff)
downloadexternal_mesa3d-b76482e7312827ab13f37ab9a7e3c8eef30bfe7a.zip
external_mesa3d-b76482e7312827ab13f37ab9a7e3c8eef30bfe7a.tar.gz
external_mesa3d-b76482e7312827ab13f37ab9a7e3c8eef30bfe7a.tar.bz2
glsl/glcpp: Add test for "#define without macro name"
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>
Diffstat (limited to 'src/glsl/glcpp')
-rw-r--r--src/glsl/glcpp/tests/139-define-without-macro-name.c2
-rw-r--r--src/glsl/glcpp/tests/139-define-without-macro-name.c.expected2
2 files changed, 4 insertions, 0 deletions
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
index 0000000..de3ed98
--- /dev/null
+++ b/src/glsl/glcpp/tests/139-define-without-macro-name.c
@@ -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
index 0000000..000aeaf
--- /dev/null
+++ b/src/glsl/glcpp/tests/139-define-without-macro-name.c.expected
@@ -0,0 +1,2 @@
+0:1(1): preprocessor error: #define without macro name
+Error expected because no macro name is ever given!