assert

package
v0.0.0-...-f6c12a3 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Assertion helpers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert deprecated

func Assert(t testing.TB, expr bool)

Deprecated: use `Equal(t, expr, true)` replacing `Assert(t, attempts == 1)` with `Equal(t, attempts, 1)` allows for better error messages.

func Equal

func Equal[T comparable](t testing.TB, actual T, expected T)

func EqualInt deprecated

func EqualInt(t testing.TB, actual int, expected int)

Deprecated: use Equal()

func EqualJSON

func EqualJSON(t testing.TB, obj interface{}, expected string)

func EqualJson deprecated

func EqualJson(t testing.TB, obj interface{}, expected string)

Deprecated: use fn with JSON uppercased

func EqualString deprecated

func EqualString(t testing.TB, actual string, expected string)

Deprecated: use Equal()

func Matches

func Matches(t testing.TB, actual string, pattern string)

func Ok

func Ok(t testing.TB, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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