Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertWASMBinary ¶
func AssertWASMBinary(t *testing.T, binaryFile string, functionName string, expectedOutput any, expectedOutputType ExpectedOutput)
Reads a WASM binary, calls a function from it and check it's return value against the provided expected output. Under the hood, it uses the testify/assert library to assert the equality check
Should only be used in a testing environment (ie in a *_test.go file, ran under `go test`)
Types ¶
type ExpectedOutput ¶
type ExpectedOutput string
const ( ExpectedOutputI32 ExpectedOutput = "i32" ExpectedOutputF32 ExpectedOutput = "f32" )
Click to show internal directories.
Click to hide internal directories.