diff options
author | Ian Romanick <[email protected]> | 2010-03-11 14:46:19 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2010-03-11 14:46:19 -0800 |
commit | 7e3ed40200ac87c50b84f73409ca0df48fc6a25d (patch) | |
tree | 64624a03f39876a7d31b3fcda5751090a7241acb /tests | |
parent | ed45ec6a515f3529f12fc23d51621e435d3b6cdf (diff) |
Add a handful of simple tests for function calls in constructors
Diffstat (limited to 'tests')
-rw-r--r-- | tests/constructor-01.glsl | 4 | ||||
-rw-r--r-- | tests/function-01.glsl | 16 | ||||
-rw-r--r-- | tests/function-02.glsl | 16 | ||||
-rw-r--r-- | tests/function-03.glsl | 16 |
4 files changed, 52 insertions, 0 deletions
diff --git a/tests/constructor-01.glsl b/tests/constructor-01.glsl new file mode 100644 index 00000000000..f7af569c683 --- /dev/null +++ b/tests/constructor-01.glsl @@ -0,0 +1,4 @@ +void main() +{ + gl_Position = vec4(1.0, 1.0, 1.0, 0.0);; +} diff --git a/tests/function-01.glsl b/tests/function-01.glsl new file mode 100644 index 00000000000..0eaa2397ab6 --- /dev/null +++ b/tests/function-01.glsl @@ -0,0 +1,16 @@ +/* FAIL - no function named 'foo' exists */ + +vec4 bar(float x, float y, float z, float w) +{ + vec4 v; + v.x = x; + v.y = y; + v.z = z; + v.w = w; + return v; +} + +void main() +{ + gl_Position = foo(1.0, 1.0, 1.0, 0.0); +} diff --git a/tests/function-02.glsl b/tests/function-02.glsl new file mode 100644 index 00000000000..941fcc1ef7b --- /dev/null +++ b/tests/function-02.glsl @@ -0,0 +1,16 @@ +/* FAIL - no version of 'foo' matches the call to 'foo' */ + +vec4 foo(float x, float y, float z, float w) +{ + vec4 v; + v.x = x; + v.y = y; + v.z = z; + v.w = w; + return v; +} + +void main() +{ + gl_Position = foo(1.0, 1.0, 1.0); +} diff --git a/tests/function-03.glsl b/tests/function-03.glsl new file mode 100644 index 00000000000..6f6562ea858 --- /dev/null +++ b/tests/function-03.glsl @@ -0,0 +1,16 @@ +/* PASS */ + +vec4 foo(float x, float y, float z, float w) +{ + vec4 v; + v.x = x; + v.y = y; + v.z = z; + v.w = w; + return v; +} + +void main() +{ + gl_Position = foo(1.0, 1.0, 1.0, 0.0); +} |