Add test for invalid assignment of function return value
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 23 Mar 2010 20:23:53 +0000 (13:23 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 23 Mar 2010 20:23:53 +0000 (13:23 -0700)
tests/function-04.glsl [new file with mode: 0644]

diff --git a/tests/function-04.glsl b/tests/function-04.glsl
new file mode 100644 (file)
index 0000000..dfc0d2b
--- /dev/null
@@ -0,0 +1,15 @@
+/* FAIL - type mismatch in assignment */
+
+vec3 foo(float x, float y, float z)
+{
+  vec3 v;
+  v.x = x;
+  v.y = y;
+  v.z = z;
+  return v;
+}
+
+void main()
+{
+  gl_Position = foo(1.0, 1.0, 1.0);
+}