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