]> git.tdb.fi Git - libs/gl.git/blob - tests/glsl/invalid_expressions.glsl
cf27c9a5f0d1a2a5d8a52de90aa462c15ecf0e99
[libs/gl.git] / tests / glsl / invalid_expressions.glsl
1 #pragma MSP stage(vertex)
2 void main()
3 {
4         int i = 1.0;
5         bool b = 0;
6         i = b;
7         float f = b;
8         i+b;
9         mat3x2 m;
10         vec3 v;
11         m*m;
12         v*m;
13 }
14
15 /* Expected error:
16 <test>:4: Initializing a variable of type 'int' with an expression of type 'float'
17 <test>:5: Initializing a variable of type 'bool' with an expression of type 'int'
18 <test>:6: Assignment to variable of type 'int' from expression of type 'bool'
19 <test>:7: Initializing a variable of type 'float' with an expression of type 'bool'
20 <test>:8: No matching operator '+' found for 'int' and 'bool'
21 <test>:11: No matching operator '*' found for 'mat3x2' and 'mat3x2'
22 <test>:12: No matching operator '*' found for 'vec3' and 'mat3x2'
23 */