Update WASI tests to use wasi crate v0.9.0 (#743)

This commit updates _all_ WASI test programs to use the latest
version of the `wasi` crate (`v0.9.0`). While at it, it also
unifies asserting error conditions across all test programs.
This commit is contained in:
Jakub Konka
2019-12-24 22:04:15 +01:00
committed by Dan Gohman
parent 907e7aac01
commit 51f3ac0c45
37 changed files with 862 additions and 1860 deletions

View File

@@ -1,10 +1,8 @@
use wasi_old::wasi_unstable;
fn test_sched_yield() {
assert!(wasi_unstable::sched_yield().is_ok(), "sched_yield");
unsafe fn test_sched_yield() {
wasi::sched_yield().expect("sched_yield");
}
fn main() {
// Run tests
test_sched_yield()
unsafe { test_sched_yield() }
}