cts
cts copied to clipboard
wgsl: Add short-circuiting validation tests
Test that the short-circuiting logical expressions are only accepted for scalar boolean types.
Also test that they guard invalid expressions on the right-hand-side when the left-hand-side is a const-expression.
Requirements for PR author:
- [X] All missing test coverage is tracked with "TODO" or
.unimplemented(). - [X] New helpers are
/** documented */and new helper files are found inhelper_index.txt. - [X] Test behaves as expected in a WebGPU implementation. (If not passing, explain above.)
- [X] Test have be tested with compatibility mode validation enabled and behave as expected. (If not passing, explain above.)
Requirements for reviewer sign-off:
- [ ] Tests are properly located in the test tree.
- [ ] Test descriptions allow a reader to "read only the test plans and evaluate coverage completeness", and accurately reflect the test code.
- [ ] Tests provide complete coverage (including validation control cases). Missing coverage MUST be covered by TODOs.
- [ ] Helpers and types promote readability and maintainability.
When landing this PR, be sure to make any necessary issue status updates.
https://github.com/gpuweb/gpuweb/pull/4801 resolves the spec issue.