[Mesa-dev] [PATCH 1/6] glsl/glcpp: Add test for "#define without macro name"

Carl Worth cworth at cworth.org
Tue Jul 1 18:03:36 PDT 2014


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.
---
 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(+)
 create mode 100644 src/glsl/glcpp/tests/139-define-without-macro-name.c
 create mode 100644 src/glsl/glcpp/tests/139-define-without-macro-name.c.expected

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!
-- 
2.0.0



More information about the mesa-dev mailing list