jsontest

package
v0.0.0-...-f144b2e Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Array

type Array[T any] []T

type Asserter

type Asserter struct {
	JSON string
}

func NewAsserter

func NewAsserter(v any) (*Asserter, error)

func (*Asserter) AssertEqual

func (d *Asserter) AssertEqual(t TB, path string, value any)

func (*Asserter) AssertEqualSet

func (d *Asserter) AssertEqualSet(t TB, path string, expected map[string]any)

func (*Asserter) AssertNotSet

func (d *Asserter) AssertNotSet(t TB, path string)

func (*Asserter) Get

func (d *Asserter) Get(path string) (any, bool)

func (*Asserter) Print

func (d *Asserter) Print(t TB)

func (*Asserter) PrintAt

func (d *Asserter) PrintAt(t TB, path string)

type IsOneofKey

type IsOneofKey string

type LenEqual

type LenEqual int

type NotSet

type NotSet struct{}

type TB

type TB interface {
	Fatalf(format string, args ...any)
	Errorf(format string, args ...any)
	Log(args ...any)
	Helper()
}

type TestAsserter

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

func NewTestAsserter

func NewTestAsserter(t TB, v any) *TestAsserter

func (*TestAsserter) AssertEqual

func (ta *TestAsserter) AssertEqual(path string, value any)

func (*TestAsserter) AssertEqualSet

func (ta *TestAsserter) AssertEqualSet(path string, expected map[string]any)

func (*TestAsserter) AssertNotSet

func (ta *TestAsserter) AssertNotSet(path string)

func (*TestAsserter) Get

func (ta *TestAsserter) Get(path string) (any, bool)

func (*TestAsserter) Print

func (ta *TestAsserter) Print()

func (*TestAsserter) PrintAt

func (ta *TestAsserter) PrintAt(path string)

Jump to

Keyboard shortcuts

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