[Piglit] [PATCH 2/3] arb_shader_subroutine: Add more negative tests for typename list

Chris Forbes chrisf at ijw.co.nz
Sun Aug 10 05:35:38 PDT 2014


Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
 .../compiler/subroutine-def-empty-type-list.vert      | 19 +++++++++++++++++++
 .../compiler/subroutine-def-not-identifier.vert       | 11 +++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 tests/spec/arb_shader_subroutine/compiler/subroutine-def-empty-type-list.vert
 create mode 100644 tests/spec/arb_shader_subroutine/compiler/subroutine-def-not-identifier.vert

diff --git a/tests/spec/arb_shader_subroutine/compiler/subroutine-def-empty-type-list.vert b/tests/spec/arb_shader_subroutine/compiler/subroutine-def-empty-type-list.vert
new file mode 100644
index 0000000..2eb3a47
--- /dev/null
+++ b/tests/spec/arb_shader_subroutine/compiler/subroutine-def-empty-type-list.vert
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shader_subroutine
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_subroutine: require
+
+/* According to the GLSL 4.40 grammar, the list of subroutine types
+ * between parentheses is defined as:
+ *
+ * type_name_list:
+ *	TYPE_NAME
+ *	type_name_list COMMA TYPE_NAME
+ *
+ * Therefore, it cannot be empty.
+ */
+subroutine ( /* nothing */ ) void f() {}
diff --git a/tests/spec/arb_shader_subroutine/compiler/subroutine-def-not-identifier.vert b/tests/spec/arb_shader_subroutine/compiler/subroutine-def-not-identifier.vert
new file mode 100644
index 0000000..242c309
--- /dev/null
+++ b/tests/spec/arb_shader_subroutine/compiler/subroutine-def-not-identifier.vert
@@ -0,0 +1,11 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shader_subroutine
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_subroutine: require
+
+/* Not an identifier. */
+subroutine (42) void f() {}
-- 
2.0.4



More information about the Piglit mailing list