MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / run_wasmtime_unreachable_wat

Function run_wasmtime_unreachable_wat

tests/all/cli_tests.rs:149–158  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

147// Running a wat that traps.
148#[test]
149fn run_wasmtime_unreachable_wat() -> Result<()> {
150 let wasm = build_wasm("tests/all/cli_tests/unreachable.wat")?;
151 let output = run_wasmtime_for_output(&[wasm.path().to_str().unwrap(), "-Ccache=n"], None)?;
152
153 assert_ne!(output.stderr, b"");
154 assert_eq!(output.stdout, b"");
155
156 assert_trap_code(&output.status);
157 Ok(())
158}
159
160fn assert_trap_code(status: &ExitStatus) {
161 let code = status

Callers

nothing calls this directly

Calls 7

run_wasmtime_for_outputFunction · 0.85
OkFunction · 0.85
to_strMethod · 0.80
build_wasmFunction · 0.70
assert_trap_codeFunction · 0.70
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected