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

Function assert_invalid_target

tests/all/module.rs:34–44  ·  view source on GitHub ↗
(target: &str)

Source from the content-addressed store, hash-verified

32 return Ok(());
33
34 fn assert_invalid_target(target: &str) -> Result<()> {
35 match Module::new(&Engine::new(Config::new().target(target)?)?, "(module)") {
36 Ok(_) => unreachable!(),
37 Err(e) => assert!(
38 format!("{e:?}").contains("configuration does not match the host"),
39 "bad error: {e:?}"
40 ),
41 }
42
43 Ok(())
44 }
45}
46
47#[test]

Callers 1

Calls 3

OkFunction · 0.85
newFunction · 0.50
targetMethod · 0.45

Tested by 1