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

Function subtest

cranelift/filetests/src/test_optimize.rs:25–37  ·  view source on GitHub ↗
(parsed: &TestCommand)

Source from the content-addressed store, hash-verified

23}
24
25pub fn subtest(parsed: &TestCommand) -> Result<Box<dyn SubTest>> {
26 assert_eq!(parsed.command, "optimize");
27 let mut test = TestOptimize {
28 precise_output: false,
29 };
30 for option in parsed.options.iter() {
31 match option {
32 TestOption::Flag("precise-output") => test.precise_output = true,
33 _ => anyhow::bail!("unknown option on {parsed}"),
34 }
35 }
36 Ok(Box::new(test))
37}
38
39impl SubTest for TestOptimize {
40 fn name(&self) -> &'static str {

Callers

nothing calls this directly

Calls 3

OkFunction · 0.85
newFunction · 0.50
iterMethod · 0.45

Tested by

no test coverage detected