Skip to content

Commit ac43ee5

Browse files
author
Michael-F-Bryan
committed
An exit code of 0 is no longer an error
1 parent 7434912 commit ac43ee5

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

lib/wasi/tests/runners.rs

+2-10
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,9 @@ mod wasi {
4949
.with_args(["--version"])
5050
.run_command("wat2wasm", &pkg, Arc::new(rt))
5151
});
52-
let err = handle.join().unwrap().unwrap_err();
52+
let result = handle.join().unwrap();
5353

54-
let runtime_error = err
55-
.chain()
56-
.find_map(|e| e.downcast_ref::<WasiError>())
57-
.expect("Couldn't find a WasiError");
58-
let exit_code = match runtime_error {
59-
WasiError::Exit(code) => *code,
60-
other => unreachable!("Something else went wrong: {:?}", other),
61-
};
62-
assert!(exit_code.is_success());
54+
assert!(result.is_ok());
6355
}
6456

6557
#[tokio::test]

0 commit comments

Comments
 (0)