MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime-go / TestLinkerTrap

Function TestLinkerTrap

linker_test.go:67–78  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

65}
66
67func TestLinkerTrap(t *testing.T) {
68 store := NewStore(NewEngine())
69 wasm, err := Wat2Wasm(`(func unreachable) (start 0)`)
70 require.NoError(t, err)
71 module, err := NewModule(store.Engine, wasm)
72 require.NoError(t, err)
73
74 linker := NewLinker(store.Engine)
75 inst, err := linker.Instantiate(store, module)
76 require.Nil(t, inst)
77 require.Error(t, err)
78}
79
80func TestLinkerModule(t *testing.T) {
81 store := NewStore(NewEngine())

Callers

nothing calls this directly

Calls 7

InstantiateMethod · 0.95
NewStoreFunction · 0.85
NewEngineFunction · 0.85
Wat2WasmFunction · 0.85
NewModuleFunction · 0.85
NewLinkerFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…