aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2012-11-16 16:51:22 -0800
committerIan Romanick <ian.d.romanick@intel.com>2012-12-04 19:07:29 -0800
commitd255888b4f9c4ba16f48155abf1cf976b8048c76 (patch)
tree0c17205b0714dc42ab7e1adaf62b8f8631ea328b
parentc3479c9303b839635acf889dede4b82d49df8e02 (diff)
glsl-es-3.00: Add test for line continuation
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
-rw-r--r--tests/spec/glsl-es-3.00/compiler/line-continuation.vert27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/spec/glsl-es-3.00/compiler/line-continuation.vert b/tests/spec/glsl-es-3.00/compiler/line-continuation.vert
new file mode 100644
index 00000000..527e9e79
--- /dev/null
+++ b/tests/spec/glsl-es-3.00/compiler/line-continuation.vert
@@ -0,0 +1,27 @@
+#version 300 es
+
+/* [config]
+ * expect_result: pass
+ * glsl_version: 3.00
+ * [end config]
+ *
+ * Page 8 (page 14 of the PDF) of the OpenGL ES Shading Language 3.00 spec
+ * says:
+ *
+ * "Backslash ('\'), used to indicate line continuation when immediately
+ * preceding a new-line."
+ */
+
+#define some_macro \
+ junk \
+ junk
+
+
+void main()
+{
+ /* Nothing says that line continuation can only be used in a macro
+ * definition, even though that's the only sensible place to use it.
+ */
+ gl_Position = \
+ vec4(0.);
+}