skia2/resources/sksl/errors/OverflowInlinedLiteral.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

37 lines
882 B
Plaintext

short cast_int_to_short(int x) {
return short(x);
}
short2 cast_int2_to_short2(int2 x) {
return short2(x);
}
int cast_float_to_int(float x) {
return int(x);
}
int3 cast_float3_to_int3(float3 x) {
return int3(x);
}
short negate_short(short x) {
return -x;
}
int4 negate_int4(int4 x) {
return -x;
}
void main() {
cast_int_to_short(99999);
cast_int2_to_short2(int2(12345, 67890));
cast_float_to_int(5000000000.0);
cast_float3_to_int3(float3(3000000000, 2000000, 1000));
negate_short(-32768);
negate_int4(int4(-2147483648));
}
/*%%*
integer is out of range for type 'short': 99999
integer is out of range for type 'short': 67890
integer is out of range for type 'int': 5000000000
integer is out of range for type 'int': 3000000000
integer is out of range for type 'short': 32768
integer is out of range for type 'int': 2147483648
*%%*/