diff options
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 0000000000..f7af569c68 --- /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 0000000000..0eaa2397ab --- /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 0000000000..941fcc1ef7 --- /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 0000000000..6f6562ea85 --- /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); +} |