bfc9be0f77
This will allow us to load these inputs for unit testing in `dm`. Change-Id: Id256ba7c30d3ec94b98048e47af44cf9efe580d5 Bug: skia:11009 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357282 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
bool test() {
|
|
bool ok = true;
|
|
ok = ok && (float2x2(float2(1.0, 0.0), float2(0.0, 1.0)) ==
|
|
float2x2(float2(1.0, 0.0), float2(0.0, 1.0)));
|
|
ok = ok && !(float2x2(float2(1.0, 0.0), float2(1.0, 1.0)) ==
|
|
float2x2(float2(1.0, 0.0), float2(0.0, 1.0)));
|
|
|
|
ok = ok && (float2x2(1) == float2x2(1));
|
|
ok = ok && !(float2x2(1) == float2x2(0));
|
|
|
|
ok = ok && (float2x2(1) == float2x2(float2(1.0, 0.0), float2(0.0, 1.0)));
|
|
ok = ok && !(float2x2(2) == float2x2(float2(1.0, 0.0), float2(0.0, 1.0)));
|
|
|
|
ok = ok && !(float2x2(1) != float2x2(1));
|
|
ok = ok && (float2x2(1) != float2x2(0));
|
|
ok = ok && (float3x3(float3(1.0, 0.0, 0.0), float3(0.0, 1.0, 0.0), float3(0.0, 0.0, 0.0)) ==
|
|
float3x3(float2x2(1.0)));
|
|
ok = ok && (float2x2(float3x3(1.0)) == float2x2(1.0));
|
|
ok = ok && (float2x2(float4(1.0, 0.0, 0.0, 1.0)) == float2x2(1.0));
|
|
ok = ok && (float2x2(1.0, 0.0, float2(0.0, 1.0)) == float2x2(1.0));
|
|
ok = ok && (float2x2(float2(1.0, 0.0), 0.0, 1.0) == float2x2(1.0));
|
|
return ok;
|
|
}
|
|
|
|
half4 main() {
|
|
return test() ? half4(0,1,0,1) : half4(1,0,0,1);
|
|
}
|