[Mesa-dev] [PATCH 6/6] glsl/glcpp: Add testing for null directives with spaces and comments

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


This new "make check" test stresses out the support from the last two commits,
(to esnure that '#' is correctly interpreted as the null directives,
regardless of any whitespace or comments on the same line).
---
 src/glsl/glcpp/tests/138-null-directive.c          | 9 +++++++++
 src/glsl/glcpp/tests/138-null-directive.c.expected | 9 +++++++++
 2 files changed, 18 insertions(+)
 create mode 100644 src/glsl/glcpp/tests/138-null-directive.c
 create mode 100644 src/glsl/glcpp/tests/138-null-directive.c.expected

diff --git a/src/glsl/glcpp/tests/138-null-directive.c b/src/glsl/glcpp/tests/138-null-directive.c
new file mode 100644
index 0000000..1dcb26e
--- /dev/null
+++ b/src/glsl/glcpp/tests/138-null-directive.c
@@ -0,0 +1,9 @@
+/* GLSL accepts a null directive. Let's test that in several variations: */
+#
+        #        
+/*....*/#/*....*/
+ /*..*/ # /*..*/ 
+#//...
+        #   //...
+/*....*/#/**///..
+ /*..*/ # /**/ //
diff --git a/src/glsl/glcpp/tests/138-null-directive.c.expected b/src/glsl/glcpp/tests/138-null-directive.c.expected
new file mode 100644
index 0000000..fa103f6
--- /dev/null
+++ b/src/glsl/glcpp/tests/138-null-directive.c.expected
@@ -0,0 +1,9 @@
+ 
+
+
+
+
+
+
+
+
-- 
2.0.0



More information about the mesa-dev mailing list