]> git.tdb.fi Git - libs/gl.git/blobdiff - tests/glsl/invalid_expressions.glsl
Properly resolve arithmetic assignment operators
[libs/gl.git] / tests / glsl / invalid_expressions.glsl
index cf27c9a5f0d1a2a5d8a52de90aa462c15ecf0e99..996b0d355fecc09b2ce14d51f134672e12fa035f 100644 (file)
@@ -4,8 +4,10 @@ void main()
        int i = 1.0;
        bool b = 0;
        i = b;
+       i *= b;
        float f = b;
-       i+b;
+       f+b;
+       i /= f;
        mat3x2 m;
        vec3 v;
        m*m;
@@ -13,11 +15,13 @@ void main()
 }
 
 /* Expected error:
-<test>:4: Initializing a variable of type 'int' with an expression of type 'float'
-<test>:5: Initializing a variable of type 'bool' with an expression of type 'int'
-<test>:6: Assignment to variable of type 'int' from expression of type 'bool'
-<test>:7: Initializing a variable of type 'float' with an expression of type 'bool'
-<test>:8: No matching operator '+' found for 'int' and 'bool'
-<test>:11: No matching operator '*' found for 'mat3x2' and 'mat3x2'
-<test>:12: No matching operator '*' found for 'vec3' and 'mat3x2'
+<test>:4: Initializing a variable of type 'int' with an expression of incompatible type 'float'
+<test>:5: Initializing a variable of type 'bool' with an expression of incompatible type 'int'
+<test>:6: Assignment to variable of type 'int' from expression of incompatible type 'bool'
+<test>:7: No matching operator '*' found for 'int' and 'bool'
+<test>:8: Initializing a variable of type 'float' with an expression of incompatible type 'bool'
+<test>:9: No matching operator '+' found for 'float' and 'bool'
+<test>:10: No matching operator '/' found for 'int' and 'float'
+<test>:13: No matching operator '*' found for 'mat3x2' and 'mat3x2'
+<test>:14: No matching operator '*' found for 'vec3' and 'mat3x2'
 */