xref: /aosp_15_r20/external/skia/resources/sksl/errors/OverflowUintLiteral.sksl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1// Expect 6 errors
2
3uint uintMin         = 0;
4uint uintMinMinusOne = -1;                             // error
5uint uintMax         = 4294967295;
6uint uintMaxPlusOne  = 4294967296;                     // error
7
8ushort4 us4_neg = ushort4(2, 1, 0, -1);                // error -1
9ushort4 us4_pos = ushort4(65536, 65535, 65534, 65533); // error 65536
10
11uint   cast_int   = uint(4294967296.);                 // error
12ushort cast_short = ushort(65536.);                    // error
13
14/*%%*
15value is out of range for type 'uint': -1
16integer is too large: 4294967296
17value is out of range for type 'ushort': -1
18value is out of range for type 'ushort': 65536
19value is out of range for type 'uint': 4294967296
20value is out of range for type 'ushort': 65536
21*%%*/
22