From 3252b18590253f856ee8239507c98fbcd3ea6725 Mon Sep 17 00:00:00 2001
From: John Kessenich <cepheus@frii.com>
Date: Mon, 4 Mar 2013 23:50:08 +0000
Subject: [PATCH] Minor updates to tests.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20758 e7fa87d3-cd2b-0410-9028-fcbf551c1848
---
 Test/120.vert         | 11 +++++++++++
 Test/constErrors.frag | 22 ++++++++++++++++++++++
 Test/errors.frag      |  4 ++++
 Test/testlist         |  2 ++
 4 files changed, 39 insertions(+)
 create mode 100644 Test/constErrors.frag
 create mode 100644 Test/errors.frag

diff --git a/Test/120.vert b/Test/120.vert
index c729ca4ef..9e8afbc35 100644
--- a/Test/120.vert
+++ b/Test/120.vert
@@ -15,4 +15,15 @@ void main()
 {
     centTexCoord = attv2; 
     gl_Position = attv4;
+
+    vec3[12] a;
+    vec4[a.length()] b;
+    gl_Position = b[b.length()-1];
+
+    float f[];
+    int a = f.length();
 }
+
+uniform float initted = 3.4;
+
+const float concall = sin(0.3);
diff --git a/Test/constErrors.frag b/Test/constErrors.frag
new file mode 100644
index 000000000..282e5b96e
--- /dev/null
+++ b/Test/constErrors.frag
@@ -0,0 +1,22 @@
+#version 330
+
+in vec4 inVar;
+out vec4 outVar;
+
+const int constInt = 3;
+
+uniform int uniformInt;
+
+void main()
+{
+    const int a1 = 2;          // okay
+    const int a2 = constInt;   // okay
+    const int a3 = uniformInt; // error
+
+    vec4 c[constInt];              // okay
+    vec4 d[uniformInt];            // error
+    vec4 e[constInt + uniformInt]; // error
+    vec4 f[uniformInt + constInt]; // error
+
+    vec4 g[sin(3.2)];              // okay
+}
diff --git a/Test/errors.frag b/Test/errors.frag
new file mode 100644
index 000000000..99cf2b936
--- /dev/null
+++ b/Test/errors.frag
@@ -0,0 +1,4 @@
+int main(int foo)
+{
+    return 1;
+}
diff --git a/Test/testlist b/Test/testlist
index 672b281f4..723314c37 100644
--- a/Test/testlist
+++ b/Test/testlist
@@ -25,3 +25,5 @@ comment.frag
 300.frag
 330.frag
 330comp.frag
+constErrors.frag
+errors.frag
-- 
GitLab