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

Function test_empty_block

cranelift/codegen/src/verifier/mod.rs:2339–2350  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2337
2338 #[test]
2339 fn test_empty_block() {
2340 let mut func = Function::new();
2341 let block0 = func.dfg.make_block();
2342 func.layout.append_block(block0);
2343
2344 let flags = &settings::Flags::new(settings::builder());
2345 let verifier = Verifier::new(&func, flags.into());
2346 let mut errors = VerifierErrors::default();
2347 let _ = verifier.run(&mut errors);
2348
2349 assert_err_with_msg!(errors, "block0 cannot be empty");
2350 }
2351}

Callers

nothing calls this directly

Calls 5

make_blockMethod · 0.80
append_blockMethod · 0.80
newFunction · 0.50
builderFunction · 0.50
runMethod · 0.45

Tested by

no test coverage detected