Skip to content

Conversation

@andyleiserson
Copy link
Contributor

In the cases where valid = true, we want to test with a const declaration, to ensure that the constructor is supported in const exprs. But in cases where valid = false, some of the subject types are not constructible, and may be rejected in a const declaration for that reason, even if the implementation is not properly restricting the use of zero-value constructors.

This changes the test to use const when valid = true and let when valid = false, which make the the tests more sensitive to the functionality they are intending to cover.

Tests still pass in Chrome. The valid_array case is failing in Safari either with or without this change. With this change, the invalid_rta, invalid_override_array, and invalid_atomic cases fail in Firefox, which I believe accurately reflects defects in the implementation.


Requirements for PR author:

  • All missing test coverage is tracked with "TODO" or .unimplemented().
  • New helpers are /** documented */ and new helper files are found in helper_index.txt.
  • Test behaves as expected in a WebGPU implementation. (If not passing, explain above.)
  • 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.
  • Test descriptions are accurate and complete.
  • Tests provide complete coverage (including validation control cases). Missing coverage MUST be covered by TODOs.
  • Tests avoid over-parameterization (see case count report).

When landing this PR, be sure to make any necessary issue status updates.

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

Results for build job (at 7f892cb):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant