Mesa (master): glsl/glcpp: Add test for "#define without macro name"

Ian Romanick idr at kemper.freedesktop.org
Thu Aug 7 23:08:46 UTC 2014


Module: Mesa
Branch: master
Commit: b76482e7312827ab13f37ab9a7e3c8eef30bfe7a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b76482e7312827ab13f37ab9a7e3c8eef30bfe7a

Author: Carl Worth <cworth at cworth.org>
Date:   Tue Jul  1 17:44:55 2014 -0700

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 at intel.com>

---

 src/glsl/glcpp/tests/139-define-without-macro-name.c          |    2 ++
 src/glsl/glcpp/tests/139-define-without-macro-name.c.expected |    2 ++
 2 files changed, 4 insertions(+)

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!




More information about the mesa-commit mailing list