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

Function TestFuncWrapSimple1Arg

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

Source from the content-addressed store, hash-verified

150}
151
152func TestFuncWrapSimple1Arg(t *testing.T) {
153 store := NewStore(NewEngine())
154 f := WrapFunc(store, func(i int32) {
155 if i != 3 {
156 panic("wrong argument")
157 }
158 })
159 result, trap := f.Call(store, 3)
160 require.Nil(t, trap)
161 require.Nil(t, result)
162}
163
164func TestFuncWrapSimpleManyArg(t *testing.T) {
165 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…