More array declaration tests

This commit is contained in:
Ian Romanick 2010-03-31 16:16:54 -07:00
parent 299ed08a68
commit 615adcda8a
5 changed files with 51 additions and 0 deletions

9
tests/array-09.glsl Normal file
View File

@ -0,0 +1,9 @@
#version 120
/* PASS */
void main()
{
vec4 a[2] = vec4 [2] (vec4(1.0), vec4(2.0));
gl_Position = gl_Vertex;
}

11
tests/array-10.glsl Normal file
View File

@ -0,0 +1,11 @@
/* FAIL - array constructors forbidden in GLSL 1.10
*
* This can also generate an error because the 'vec4[]' style syntax is
* illegal in GLSL 1.10.
*/
void main()
{
vec4 a[2] = vec4 [2] (vec4(1.0), vec4(2.0));
gl_Position = gl_Vertex;
}

9
tests/array-11.glsl Normal file
View File

@ -0,0 +1,9 @@
#version 120
/* PASS */
void main()
{
vec4 a[] = vec4 [] (vec4(1.0), vec4(2.0));
gl_Position = gl_Vertex;
}

11
tests/array-12.glsl Normal file
View File

@ -0,0 +1,11 @@
#version 120
/* FAIL - array must have an implicit or explicit size */
void main()
{
vec4 a[];
a = vec4 [2] (vec4(1.0), vec4(2.0));
gl_Position = gl_Vertex;
}

11
tests/array-13.glsl Normal file
View File

@ -0,0 +1,11 @@
#version 120
/* PASS */
void main()
{
vec4 a[2];
a = vec4 [] (vec4(1.0), vec4(2.0));
gl_Position = gl_Vertex;
}