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>
16 lines
712 B
Plaintext
16 lines
712 B
Plaintext
void array_neg1 () { int a[123]; int v = a[-1]; }
|
|
void array_0 () { float a[123]; float v = a[0]; }
|
|
void array_122 () { bool2 a[123]; bool2 v = a[122]; }
|
|
void array_123 () { half4x4 a[123]; half4x4 v = a[123]; }
|
|
void array_huge () { int4 a[123]; int4 v = a[1000000000]; }
|
|
void array_overflow () { half3 a[123]; half3 v = a[3000000000]; }
|
|
void array_no_index () { int a[123]; int v = a[]; }
|
|
|
|
/*%%*
|
|
index -1 out of range for 'int[123]'
|
|
index 123 out of range for 'half4x4[123]'
|
|
index 1000000000 out of range for 'int4[123]'
|
|
index 3000000000 out of range for 'half3[123]'
|
|
missing index in '[]'
|
|
*%%*/
|