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

Function TestFuncWrapSimple

func_test.go:140–150  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

138}
139
140func TestFuncWrapSimple(t *testing.T) {
141 store := NewStore(NewEngine())
142 called := false
143 f := WrapFunc(store, func() {
144 called = true
145 })
146 result, trap := f.Call(store)
147 require.Nil(t, trap)
148 require.Nil(t, result)
149 require.True(t, called, "not called")
150}
151
152func TestFuncWrapSimple1Arg(t *testing.T) {
153 store := NewStore(NewEngine())

Callers

nothing calls this directly

Calls 4

NewStoreFunction · 0.85
NewEngineFunction · 0.85
WrapFuncFunction · 0.85
CallMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…