Refactor the wasmtime-wast crate, fix an early return (#798)

This commit refactors the `wasmtime-wast` crate to internally make it a
bit more concise with less repetition. Additionally it also improves the
error messages by guaranteeing that all failed tests have context
indicating where the test was defined.

It turns out there was also a bug in the previous implementation where
an `AssertMalformed` directive with a `quote` module would accidentally
skip all further tests. This has now been fixed, and all futher tests
continued to pass except for the `simd_const.wast` test. This test has
been disabled temporarily but once the `wasmparser` and `wast` crates
are updated (being worked on independently) this should be possible to
re-enable.
This commit is contained in:
Alex Crichton
2020-01-10 14:17:49 -06:00
committed by GitHub
parent aa41d4b12b
commit 90db89d327
3 changed files with 266 additions and 325 deletions

View File

@@ -43,12 +43,14 @@ fn main() -> anyhow::Result<()> {
"simd",
strategy,
)?;
write_testsuite_tests(
&mut out,
"tests/spec_testsuite/proposals/simd/simd_const.wast",
"simd",
strategy,
)?;
// FIXME this uses some features from the reference types proposal
// (multi-table) which aren't fully implemented yet
// write_testsuite_tests(
// &mut out,
// "tests/spec_testsuite/proposals/simd/simd_const.wast",
// "simd",
// strategy,
// )?;
finish_test_module(&mut out)?;
test_directory(