summaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2014-07-01 18:00:41 -0700
committerIan Romanick <ian.d.romanick@intel.com>2014-08-07 16:08:29 -0700
commit9a54b07651f80c394fb5386855b6611aa722a34b (patch)
tree9eab77af85f8a04eabc2026328e42c100f78bf39 /src/glsl/glcpp
parentc0127c30ddf0d10c38c36288e44187ec59ccf838 (diff)
downloadexternal_mesa3d-9a54b07651f80c394fb5386855b6611aa722a34b.zip
external_mesa3d-9a54b07651f80c394fb5386855b6611aa722a34b.tar.gz
external_mesa3d-9a54b07651f80c394fb5386855b6611aa722a34b.tar.bz2
glsl/glcpp: Add testing for null directives with spaces and comments
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). Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/glsl/glcpp')
-rw-r--r--src/glsl/glcpp/tests/140-null-directive.c9
-rw-r--r--src/glsl/glcpp/tests/140-null-directive.c.expected9
2 files changed, 18 insertions, 0 deletions
diff --git a/src/glsl/glcpp/tests/140-null-directive.c b/src/glsl/glcpp/tests/140-null-directive.c
new file mode 100644
index 0000000..1dcb26e
--- /dev/null
+++ b/src/glsl/glcpp/tests/140-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/140-null-directive.c.expected b/src/glsl/glcpp/tests/140-null-directive.c.expected
new file mode 100644
index 0000000..fa103f6
--- /dev/null
+++ b/src/glsl/glcpp/tests/140-null-directive.c.expected
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+