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

Function TEST

crates/c-api/tests/component/linker.cc:7–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5using namespace wasmtime::component;
6
7TEST(Linker, allow_shadowing) {
8 wasmtime::Engine engine;
9 Linker linker(engine);
10 auto m = wasmtime::Module::compile(engine, "(module)").unwrap();
11
12 linker.root().add_module("x", m).unwrap();
13 linker.root().add_module("x", m).err();
14 linker.allow_shadowing(true);
15 linker.root().add_module("x", m).unwrap();
16}
17
18TEST(Linker, unknown_imports_trap) {
19 wasmtime::Engine engine;

Callers

nothing calls this directly

Calls 8

add_moduleMethod · 0.80
compileFunction · 0.50
unwrapMethod · 0.45
rootMethod · 0.45
errMethod · 0.45
allow_shadowingMethod · 0.45
instantiateMethod · 0.45

Tested by

no test coverage detected