assert

package
v0.0.0-...-a2b917b Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AssertionErrorName string = "AssertionError"
	AssertionErrorCode        = "ERR_ASSERTION"
)

Variables

This section is empty.

Functions

func Assert

func Assert() error

func Equal

func Equal(actual any, expected any, message ...any) error

func IsAssertionError

func IsAssertionError(err error) bool

func NotStrictEqual

func NotStrictEqual(actual any, expected any, message ...any) error

Types

type AssertionError

type AssertionError interface {
	isolates.Error
	Actual() *isolates.Value
	Expected() *isolates.Value
	Operator() *string
	GeneratedMessage() bool
}

type AssertionErrorBase

type AssertionErrorBase struct {
	// contains filtered or unexported fields
}

func (*AssertionErrorBase) Actual

func (e *AssertionErrorBase) Actual() any

func (*AssertionErrorBase) Code

func (e *AssertionErrorBase) Code() string

func (*AssertionErrorBase) Error

func (e *AssertionErrorBase) Error() string

func (*AssertionErrorBase) Expected

func (e *AssertionErrorBase) Expected() any

func (*AssertionErrorBase) GeneratedMessage

func (e *AssertionErrorBase) GeneratedMessage() bool

func (*AssertionErrorBase) Message

func (e *AssertionErrorBase) Message() string

func (*AssertionErrorBase) Name

func (e *AssertionErrorBase) Name() string

func (*AssertionErrorBase) Operator

func (e *AssertionErrorBase) Operator() *string

func (*AssertionErrorBase) String

func (e *AssertionErrorBase) String() string

func (*AssertionErrorBase) V8FuncToString

func (e *AssertionErrorBase) V8FuncToString(in isolates.FunctionArgs) (*isolates.Value, error)

func (*AssertionErrorBase) V8GetActual

func (e *AssertionErrorBase) V8GetActual(in isolates.GetterArgs) (*isolates.Value, error)

func (*AssertionErrorBase) V8GetCode

func (*AssertionErrorBase) V8GetExpected

func (e *AssertionErrorBase) V8GetExpected(in isolates.GetterArgs) (*isolates.Value, error)

func (*AssertionErrorBase) V8GetGeneratedMessage

func (e *AssertionErrorBase) V8GetGeneratedMessage(in isolates.GetterArgs) (*isolates.Value, error)

func (*AssertionErrorBase) V8GetMessage

func (e *AssertionErrorBase) V8GetMessage(in isolates.GetterArgs) (*isolates.Value, error)

func (*AssertionErrorBase) V8GetName

func (*AssertionErrorBase) V8GetOperator

func (e *AssertionErrorBase) V8GetOperator(in isolates.GetterArgs) (*isolates.Value, error)

type AssertionErrorOptions

type AssertionErrorOptions struct {
	// contains filtered or unexported fields
}

type Import

type Import interface{}

Jump to

Keyboard shortcuts

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