Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same test expected to result in different error messages #1841

Closed
csjh opened this issue Nov 7, 2024 · 5 comments
Closed

Same test expected to result in different error messages #1841

csjh opened this issue Nov 7, 2024 · 5 comments

Comments

@csjh
Copy link

csjh commented Nov 7, 2024

(assert_invalid

(assert_invalid

The above 2 tests seem to generate the same bytes, but two different error messages are expected from them. Not too sure which to interpret as the correct one.

@keithw
Copy link
Member

keithw commented Nov 7, 2024

I believe the spec interpreter only requires the expected error message to be a prefix of its actual error message, and in #1076 and #1089, the expected error messages at the time were edited to remove the indices (so that implementations wouldn't be required to produce a dynamically formatted error message). Some later tests have come in after this...

@csjh
Copy link
Author

csjh commented Nov 7, 2024

Interesting - are some of these test quirks documented anywhere? There's a few I've picked up on (spectest globals initializing with the value 666 comes to mind) which are a bit hard to pick up on w/o asking around

@rossberg
Copy link
Member

rossberg commented Nov 7, 2024

Unfortunately, not really. The closest you get to documentation for the .wast format is here. At least the signature of the spectest module is listed there as well, though not its values.

I'll add that information to that doc.

@rossberg
Copy link
Member

rossberg commented Nov 7, 2024

Done.

@csjh
Copy link
Author

csjh commented Nov 7, 2024

Thanks!

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

No branches or pull requests

3 participants