cts icon indicating copy to clipboard operation
cts copied to clipboard

wgsl: Add short-circuiting validation tests

Open jrprice opened this issue 1 year ago • 1 comments

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 in helper_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.

jrprice avatar Mar 28 '24 13:03 jrprice

https://github.com/gpuweb/gpuweb/pull/4801 resolves the spec issue.

alan-baker avatar Jul 30 '24 15:07 alan-baker