testing

package
v0.3.4-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

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"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL