About

Get Started

Docs

assert

import "github.com/gosolid/solid/pkg/runtime/assert"

Index

Constants

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

func Assert

func Assert() error

func IsAssertionError

func IsAssertionError(err error) bool

func NotStrictEqual

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

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 (e *AssertionErrorBase) V8GetCode(in isolates.GetterArgs) (*isolates.Value, error)

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 (e *AssertionErrorBase) V8GetName(in isolates.GetterArgs) (*isolates.Value, error)

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{}

Up next

buffer