Don't synthesize invalid errors in CommandBufferSharedTest
See the following error: https://luci-milo.appspot.com/ui/inv/build-8752488687744028897/test-results?q=CommandBufferSharedTest.TestConsistency&sortby=&groupby= It is UB to cast to an enum if it is outside the enum's range. An enum's range is pretty complex and messy[*], but since gpu::error::Error does not appear to be made for arbitrary enum values, let's just use real values in the test. [*] If you write `enum class` or `enum Error : int`, the range is the full range of the underlying type. If you write just a plain enum, the range is the minimal-width hypothetical integer that can hold all the enum values. Since this enum goes 0 to 8, its range is actually 0..15, for a hypothetically uint4_t. It's bizarre. Bug: 40942951 Change-Id: Ic3beee912e7394256f591fc40855b4004b86434e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5402196 Auto-Submit: David Benjamin <davidben@chromium.org> Reviewed-by:Victor Miura <vmiura@chromium.org> Commit-Queue: Victor Miura <vmiura@chromium.org> Cr-Commit-Position: refs/heads/main@{#1279906}
Loading
Please register or sign in to comment