testhelper

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VMExpectErrAs

func VMExpectErrAs(t *testing.T, script string, opts *VMTestOpts, asErr any, eqErr any)

func VMExpectErrHas

func VMExpectErrHas(t *testing.T, script string, opts *VMTestOpts, expectMsg string)

func VMExpectErrIs

func VMExpectErrIs(t *testing.T, script string, opts *VMTestOpts, expectErr error)

func VMExpectErrorGen

func VMExpectErrorGen(
	t *testing.T,
	script string,
	opts *VMTestOpts,
	callback func(*testing.T, error),
)

func VMTestExpectRun

func VMTestExpectRun(t *testing.T, script string, opts *VMTestOpts, expect gad.Object)

Types

type VMTestOpts

type VMTestOpts struct {
	Skip2pass     bool
	IsCompilerErr bool
	// contains filtered or unexported fields
}

func NewVMTestOpts

func NewVMTestOpts() *VMTestOpts

func (*VMTestOpts) Args

func (t *VMTestOpts) Args(args ...gad.Object) *VMTestOpts

func (*VMTestOpts) Buffered

func (t *VMTestOpts) Buffered() *VMTestOpts

func (*VMTestOpts) Builtins

func (t *VMTestOpts) Builtins(m map[string]gad.Object) *VMTestOpts

func (*VMTestOpts) CompileOptions

func (t *VMTestOpts) CompileOptions(f func(opts *gad.CompileOptions)) *VMTestOpts

func (*VMTestOpts) CompilerError

func (t *VMTestOpts) CompilerError() *VMTestOpts

func (*VMTestOpts) Context

func (t *VMTestOpts) Context(ctx context.Context) *VMTestOpts

func (*VMTestOpts) ExprToTextFunc

func (t *VMTestOpts) ExprToTextFunc(name string) *VMTestOpts

func (*VMTestOpts) GetArgs

func (t *VMTestOpts) GetArgs() gad.Array

func (*VMTestOpts) GetGlobals

func (t *VMTestOpts) GetGlobals() gad.IndexGetSetter

func (*VMTestOpts) GetModuleMap

func (t *VMTestOpts) GetModuleMap() *gad.ModuleMap

func (*VMTestOpts) GetNameArgs

func (t *VMTestOpts) GetNameArgs() *gad.NamedArgs

func (*VMTestOpts) Globals

func (t *VMTestOpts) Globals(globals gad.IndexGetSetter) *VMTestOpts

func (*VMTestOpts) Init

func (t *VMTestOpts) Init(f func(opts *VMTestOpts, expect gad.Object) (*VMTestOpts, gad.Object)) *VMTestOpts

func (*VMTestOpts) IsNoPanic

func (t *VMTestOpts) IsNoPanic() bool

func (*VMTestOpts) Mixed

func (t *VMTestOpts) Mixed(d ...*parser.MixedDelimiter) *VMTestOpts

func (*VMTestOpts) Module

func (t *VMTestOpts) Module(name string, module any) *VMTestOpts

func (*VMTestOpts) NamedArgs

func (t *VMTestOpts) NamedArgs(args gad.Object) *VMTestOpts

func (*VMTestOpts) NoPanic

func (t *VMTestOpts) NoPanic() *VMTestOpts

func (*VMTestOpts) Out

func (t *VMTestOpts) Out(w io.Writer) *VMTestOpts

func (*VMTestOpts) Skip2Pass

func (t *VMTestOpts) Skip2Pass() *VMTestOpts

func (*VMTestOpts) WriteObject

func (t *VMTestOpts) WriteObject(o gad.ObjectToWriter) *VMTestOpts

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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