summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2010-03-31 16:16:54 -0700
committerIan Romanick <[email protected]>2010-03-31 16:16:54 -0700
commit615adcda8a27783bac52f25fac9850a75d792c84 (patch)
treea88f84c18f8e07f6af0e0b706acf329311c40bb9 /tests
parent299ed08a68d4f603bb72b7635bfa5c6f95776b22 (diff)
More array declaration tests
Diffstat (limited to 'tests')
-rw-r--r--tests/array-09.glsl9
-rw-r--r--tests/array-10.glsl11
-rw-r--r--tests/array-11.glsl9
-rw-r--r--tests/array-12.glsl11
-rw-r--r--tests/array-13.glsl11
5 files changed, 51 insertions, 0 deletions
diff --git a/tests/array-09.glsl b/tests/array-09.glsl
new file mode 100644
index 00000000000..cad6d0e54ec
--- /dev/null
+++ b/tests/array-09.glsl
@@ -0,0 +1,9 @@
+#version 120
+/* PASS */
+
+void main()
+{
+ vec4 a[2] = vec4 [2] (vec4(1.0), vec4(2.0));
+
+ gl_Position = gl_Vertex;
+}
diff --git a/tests/array-10.glsl b/tests/array-10.glsl
new file mode 100644
index 00000000000..019aa21150f
--- /dev/null
+++ b/tests/array-10.glsl
@@ -0,0 +1,11 @@
+/* FAIL - array constructors forbidden in GLSL 1.10
+ *
+ * This can also generate an error because the 'vec4[]' style syntax is
+ * illegal in GLSL 1.10.
+ */
+void main()
+{
+ vec4 a[2] = vec4 [2] (vec4(1.0), vec4(2.0));
+
+ gl_Position = gl_Vertex;
+}
diff --git a/tests/array-11.glsl b/tests/array-11.glsl
new file mode 100644
index 00000000000..51d94e94773
--- /dev/null
+++ b/tests/array-11.glsl
@@ -0,0 +1,9 @@
+#version 120
+/* PASS */
+
+void main()
+{
+ vec4 a[] = vec4 [] (vec4(1.0), vec4(2.0));
+
+ gl_Position = gl_Vertex;
+}
diff --git a/tests/array-12.glsl b/tests/array-12.glsl
new file mode 100644
index 00000000000..7fc9579452f
--- /dev/null
+++ b/tests/array-12.glsl
@@ -0,0 +1,11 @@
+#version 120
+/* FAIL - array must have an implicit or explicit size */
+
+void main()
+{
+ vec4 a[];
+
+ a = vec4 [2] (vec4(1.0), vec4(2.0));
+
+ gl_Position = gl_Vertex;
+}
diff --git a/tests/array-13.glsl b/tests/array-13.glsl
new file mode 100644
index 00000000000..cc7e29a5f76
--- /dev/null
+++ b/tests/array-13.glsl
@@ -0,0 +1,11 @@
+#version 120
+/* PASS */
+
+void main()
+{
+ vec4 a[2];
+
+ a = vec4 [] (vec4(1.0), vec4(2.0));
+
+ gl_Position = gl_Vertex;
+}