summaryrefslogtreecommitdiff
path: root/tests/spec/glsl-es-3.00/compiler/undef-__VERSION__.vert
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2014-02-18 10:17:27 -0800
committerIan Romanick <ian.d.romanick@intel.com>2014-02-19 15:06:10 -0800
commitc7ff203d1f310933b1874365f4461500075cdce3 (patch)
tree44a79db26e9245ce5d8fa3008395bbc1759505c6 /tests/spec/glsl-es-3.00/compiler/undef-__VERSION__.vert
parent58390b2b38a575913a46f73c0046419017b1f364 (diff)
glsl-es-3.00: Verify that predefined macros cannot be undefined
Section 3.4 (Preprocessor) of the OpenGL ES Shading Language 3.00 spec says: "It is an error to undefine or to redefine a built-in (pre-defined) macro name." NOTE: These tests currently fail on Mesa. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'tests/spec/glsl-es-3.00/compiler/undef-__VERSION__.vert')
-rw-r--r--tests/spec/glsl-es-3.00/compiler/undef-__VERSION__.vert17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/spec/glsl-es-3.00/compiler/undef-__VERSION__.vert b/tests/spec/glsl-es-3.00/compiler/undef-__VERSION__.vert
new file mode 100644
index 000000000..5ef180695
--- /dev/null
+++ b/tests/spec/glsl-es-3.00/compiler/undef-__VERSION__.vert
@@ -0,0 +1,17 @@
+#version 300 es
+
+/* [config]
+ * expect_result: fail
+ * glsl_version: 3.00
+ * [end config]
+ *
+ * Section 3.4 (Preprocessor) of the OpenGL ES Shading Language 3.00 spec
+ * says:
+ *
+ * "It is an error to undefine or to redefine a built-in (pre-defined)
+ * macro name."
+ */
+
+#undef __VERSION__
+
+void main() { gl_Position = vec4(0); }