28991c1a34
This reverts commit43539c22a2
. Reason for revert: UB fixed at http://review.skia.org/505678 Original change's description: > Revert "Verify that tests in errors/ actually generate the expected errors." > > This reverts commit8d646c127a
. > > Reason for revert: triggering UBSAN > http://screen/887FeQtZWs2A6oo > > Original change's description: > > Verify that tests in errors/ actually generate the expected errors. > > > > Error expectations are embedded in the source with a special *%%* > > marker, like this: > > > > /*%%* > > expected 'foo', but found 'bar' > > 'baz' is not a valid identifier > > *%%*/ > > > > This unit test compiles every effect in errors/ and verifies that it > > makes an error. It also verifies that the errors returned include the > > expectations from the *%%* marker section, in the listed order, if any > > expectations have been listed. (Error expectations are not meant to be > > exhaustive; additional errors are allowed.) > > > > In this CL, I've manually attached error expectations to the first few > > error tests. A followup CL will (mechanically) add expectations to every > > error test, based on their current error reports. > > > > Change-Id: I4add30fef6419c4d3f8d2a221c5aeb53eee35ae7 > > Bug: skia:12665 > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505399 > > Auto-Submit: John Stiles <johnstiles@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > Bug: skia:12665 > Change-Id: I3bcdbe9fc1abab13656d6462b73f6439967fd96f > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505642 > Auto-Submit: John Stiles <johnstiles@google.com> > Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bug: skia:12665 Change-Id: I49e23869f4ef383a0b076006e319e0a6d7191cad Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505643 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
19 lines
388 B
Plaintext
19 lines
388 B
Plaintext
uniform half4 colorGreen, colorRed;
|
|
|
|
const int[3] values = int[3](1, 1, 1);
|
|
|
|
inline int indexArray(int index) {
|
|
return values[index];
|
|
}
|
|
|
|
half4 main(float2 coords) {
|
|
int ok = indexArray(0) + indexArray(1) + indexArray(2);
|
|
int undefined = indexArray(-1) + indexArray(3);
|
|
return colorGreen;
|
|
}
|
|
|
|
/*%%*
|
|
index -1 out of range for 'int[3]'
|
|
index 3 out of range for 'int[3]'
|
|
*%%*/
|