brson / miri

An experimental compiler from Rust to WebAssembly (inactive - do not use)
Apache License 2.0
209 stars 15 forks source link

Run tests in binaryen interpreter, check output (#15) #31

Closed eholk closed 8 years ago

eholk commented 8 years ago

This change uses the --run option (thanks, @lqd!) to run the tests in the binaryen interpreter after compiling. Since we don't have a good way to return process exit statuses from the interpreter, we check stdout instead. Comments in the source file are used to specify what the expected test output is.

@lqd and/or @brson - Could you review and accept the PR if it looks good to you?

brson commented 8 years ago

Hell yes. Thanks.

lqd commented 8 years ago

Nice!

At first I thought we wouldn't need miri's run tests, but since we need some anyway they won't hurt :smile:

We'll have to deal with #[miri_run] eventually, and we'll only probably be able to use the tests once we have wasm/js vm test runners (since they require assert! and panic!).