testwasi

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestWASIP1

func TestWASIP1(t *testing.T, filePaths []string, makeSystem MakeSystem)

TestWASIP1 is a generic test suite which runs the list of WebAssembly programs passed as file paths, creating a system and runtime to execute each of the test programs.

Tests pass if the execution completed without trapping nor calling proc_exit with a non-zero exit code.

Types

type MakeSystem

type MakeSystem func(TestConfig) (wasi.System, func(), error)

MakeSystem is a function used to create a system to run the test suites against.

The function returns the system and a callback that will be invoked after completing a test to tear down resources allocated by the system.

type TestConfig

type TestConfig struct {
	Args    []string
	Environ []string
	Stdin   *os.File
	Stdout  *os.File
	Stderr  *os.File
	RootFS  *os.File
	Rand    io.Reader
	Now     func() time.Time
}

TestConfig carries the configuration used to create systems to run the test suites against.

Jump to

Keyboard shortcuts

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