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

Function check_output

tests/all/guest_debug/mod.rs:155–166  ·  view source on GitHub ↗

Validate output against FileCheck-style directives.

(output: &str, directives: &str)

Source from the content-addressed store, hash-verified

153
154/// Validate output against FileCheck-style directives.
155fn check_output(output: &str, directives: &str) -> Result<()> {
156 let mut builder = CheckerBuilder::new();
157 builder
158 .text(directives)
159 .map_err(|e| format_err!("unable to build checker: {e:?}"))?;
160 let checker = builder.finish();
161 let check = checker
162 .explain(output, NO_VARIABLES)
163 .map_err(|e| format_err!("{e:?}"))?;
164 assert!(check.0, "didn't pass check {}", check.1);
165 Ok(())
166}
167
168/// Test that breakpoints can be set at the initial stop (before any
169/// continue), then hit when the program runs.

Callers 4

guest_debug_cli_fib_stepFunction · 0.85

Calls 4

OkFunction · 0.85
newFunction · 0.50
textMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected