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

Function subtest

cranelift/filetests/src/test_compile.rs:22–36  ·  view source on GitHub ↗
(parsed: &TestCommand)

Source from the content-addressed store, hash-verified

20}
21
22pub fn subtest(parsed: &TestCommand) -> Result<Box<dyn SubTest>> {
23 assert_eq!(parsed.command, "compile");
24 let mut test = TestCompile {
25 precise_output: false,
26 expect_fail: false,
27 };
28 for option in parsed.options.iter() {
29 match option {
30 TestOption::Flag("precise-output") => test.precise_output = true,
31 TestOption::Flag("expect-fail") => test.expect_fail = true,
32 _ => anyhow::bail!("unknown option on {parsed}"),
33 }
34 }
35 Ok(Box::new(test))
36}
37
38impl SubTest for TestCompile {
39 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