skia2/resources/sksl/errors/ComparisonDimensional.rts
John Stiles 2fdcca2777 Rename ES2 error tests from 'C' through 'G' to .rts.
A few tests received minor tweaks to make them Runtime Effect-friendly.

Change-Id: I9b4f66b0974c41d38324dfbb31ac9849338f600a
Bug: skia:13042
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/523186
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-03-21 22:50:58 +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'
*%%*/