summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-03-23 13:23:53 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-03-23 13:23:53 -0700
commit1e5cd2b05b2354006f8e33d20c3535ac2219b573 (patch)
treeb4f8e936eebc06c7e00e11cb779564d0c781106b /tests
parent0bb1c3c1539fcadaa90d592a296c2ff1de3787a4 (diff)
Add test for invalid assignment of function return value
Diffstat (limited to 'tests')
-rw-r--r--tests/function-04.glsl15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/function-04.glsl b/tests/function-04.glsl
new file mode 100644
index 0000000..dfc0d2b
--- /dev/null
+++ b/tests/function-04.glsl
@@ -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);
+}