skia2/resources/sksl/errors/ComparisonDimensional.sksl
John Stiles a456175a07 Add expected errors to every test file.
This was (crudely) automated with shell scripts:
http://go/paste/5484300603490304

Change-Id: Ic9e1c93112772d303d1158eb26d995f27b439eba
Bug: skia:12665
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505637
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-02-08 18:20:25 +00:00

40 lines
1.3 KiB
Plaintext

bool different_types() {
float2x2 m;
float2 v;
float f;
return v == f || v == m || m == f ||
f == v || m == v || f == m ||
v != f || v != m || m != f ||
f != v || m != v || f != m ;
}
bool different_matrices() {
float2x2 m2;
float3x3 m3;
return m2 == m3 || m2 != m3;
}
bool different_vectors() {
float2 v2;
float3 v3;
return v2 == v3 || v2 != v3;
}
/*%%*
type mismatch: '==' cannot operate on 'float2', 'float'
type mismatch: '==' cannot operate on 'float2', 'float2x2'
type mismatch: '==' cannot operate on 'float2x2', 'float'
type mismatch: '==' cannot operate on 'float', 'float2'
type mismatch: '==' cannot operate on 'float2x2', 'float2'
type mismatch: '==' cannot operate on 'float', 'float2x2'
type mismatch: '!=' cannot operate on 'float2', 'float'
type mismatch: '!=' cannot operate on 'float2', 'float2x2'
type mismatch: '!=' cannot operate on 'float2x2', 'float'
type mismatch: '!=' cannot operate on 'float', 'float2'
type mismatch: '!=' cannot operate on 'float2x2', 'float2'
type mismatch: '!=' cannot operate on 'float', 'float2x2'
type mismatch: '==' cannot operate on 'float2x2', 'float3x3'
type mismatch: '!=' cannot operate on 'float2x2', 'float3x3'
type mismatch: '==' cannot operate on 'float2', 'float3'
type mismatch: '!=' cannot operate on 'float2', 'float3'
*%%*/