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

22 lines
762 B
Plaintext

// Expect 6 errors
uint uintMin = 0;
uint uintMinMinusOne = -1; // error
uint uintMax = 4294967295;
uint uintMaxPlusOne = 4294967296; // error
ushort4 us4_neg = ushort4(2, 1, 0, -1); // error -1
ushort4 us4_pos = ushort4(65536, 65535, 65534, 65533); // error 65536
uint cast_int = uint(4294967296.); // error
ushort cast_short = ushort(65536.); // error
/*%%*
integer is out of range for type 'uint': -1
integer is too large: 4294967296
integer is out of range for type 'ushort': -1
integer is out of range for type 'ushort': 65536
integer is out of range for type 'uint': 4294967296
integer is out of range for type 'ushort': 65536
*%%*/