require

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package require provides a minimal subset of the testify/require API so that tests in this module can run without a third-party dependency. It intentionally covers only the functions used by the workflow test suite.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(t TestingT, container, element any, msgAndArgs ...any)

func Empty

func Empty(t TestingT, object any, msgAndArgs ...any)

Empty asserts that an object is empty: nil, a zero-length collection, a zero-length string, or the zero value of its type.

func Equal

func Equal(t TestingT, expected, actual any, msgAndArgs ...any)

func EqualValues

func EqualValues(t TestingT, expected, actual any, msgAndArgs ...any)

EqualValues compares two values after converting numeric types so that e.g. int(42) equals int64(42). For non-numeric values it falls back to Equal semantics.

func Error

func Error(t TestingT, err error, msgAndArgs ...any)

func ErrorIs

func ErrorIs(t TestingT, err, target error, msgAndArgs ...any)

func Eventually

func Eventually(t TestingT, condition func() bool, waitFor, tick time.Duration, msgAndArgs ...any)

Eventually polls condition every tick until it returns true or waitFor elapses. Fails the test if the deadline is hit first.

func False

func False(t TestingT, value bool, msgAndArgs ...any)

func Greater

func Greater(t TestingT, a, b any, msgAndArgs ...any)

func GreaterOrEqual

func GreaterOrEqual(t TestingT, a, b any, msgAndArgs ...any)

func InDelta

func InDelta(t TestingT, expected, actual any, delta float64, msgAndArgs ...any)

func Len

func Len(t TestingT, object any, length int, msgAndArgs ...any)

func LessOrEqual

func LessOrEqual(t TestingT, a, b any, msgAndArgs ...any)

func Nil

func Nil(t TestingT, value any, msgAndArgs ...any)

func NoError

func NoError(t TestingT, err error, msgAndArgs ...any)

func NotContains

func NotContains(t TestingT, container, element any, msgAndArgs ...any)

func NotEmpty

func NotEmpty(t TestingT, object any, msgAndArgs ...any)

func NotEqual

func NotEqual(t TestingT, expected, actual any, msgAndArgs ...any)

func NotNil

func NotNil(t TestingT, value any, msgAndArgs ...any)

func NotZero

func NotZero(t TestingT, value any, msgAndArgs ...any)

NotZero asserts that the value is not the zero value for its type.

func Panics

func Panics(t TestingT, f func(), msgAndArgs ...any)

func True

func True(t TestingT, value bool, msgAndArgs ...any)

Types

type TestingT

type TestingT interface {
	Helper()
	Errorf(format string, args ...any)
	FailNow()
}

TestingT is the interface common to *testing.T and *testing.B used by the helpers in this package.

Jump to

Keyboard shortcuts

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