WebAssembly / spec

WebAssembly specification, reference interpreter, and test suite.
https://webassembly.github.io/spec/
Other
3.13k stars 445 forks source link

[test] elem.wast: force to use exprs in a element #1561

Closed yamt closed 1 year ago

yamt commented 1 year ago

This change makes the test detect this bug in toywasm. https://github.com/yamt/toywasm/commit/89465d57a8ad07a2e159711c92d3625bf66c41c7

(without this change, all tests were passing even with the bug.)

Note: toywasm CI uses tests converted with wast2json.

Note: wast2json doesn't use exprs unless the element contains exprs other than ref.func. https://github.com/WebAssembly/wabt/blob/712bb5c908c35de7e4878463bb26ca0c89dac479/src/ir.cc#L680-L682

rossberg commented 1 year ago

Thanks, but can you perhaps test this case with a separate module?

yamt commented 1 year ago

Thanks, but can you perhaps test this case with a separate module?

do you mean something like the last push?