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

Function TestLinkerGetOneByName

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

Source from the content-addressed store, hash-verified

110}
111
112func TestLinkerGetOneByName(t *testing.T) {
113 store := NewStore(NewEngine())
114 linker := NewLinker(store.Engine)
115 f := linker.Get(store, "foo", "bar")
116 if f != nil {
117 panic("expected nil")
118 }
119
120 err := linker.DefineFunc(store, "foo", "baz", func() {})
121 require.NoError(t, err)
122 f = linker.Get(store, "foo", "baz")
123 f.Func().Call(store)
124}
125
126func TestLinkerFuncs(t *testing.T) {
127 engine := NewEngine()

Callers

nothing calls this directly

Calls 7

GetMethod · 0.95
DefineFuncMethod · 0.95
NewStoreFunction · 0.85
NewEngineFunction · 0.85
NewLinkerFunction · 0.85
CallMethod · 0.80
FuncMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…