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

Function engine_without_compiler_cannot_compile

tests/all/engine.rs:5–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4#[test]
5fn engine_without_compiler_cannot_compile() -> Result<()> {
6 let mut config = Config::new();
7 config.enable_compiler(false);
8 let engine = Engine::new(&config)?;
9 match Module::new(&engine, r#"(module (func (export "f") nop))"#) {
10 Ok(_) => panic!("should not compile without a compiler"),
11 Err(err) => err.assert_contains("Engine was not configured with a compiler"),
12 }
13 Ok(())
14}

Callers

nothing calls this directly

Calls 4

OkFunction · 0.85
enable_compilerMethod · 0.80
assert_containsMethod · 0.80
newFunction · 0.50

Tested by

no test coverage detected