testutil

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package testutil exposes assert utilities used in the project to make things simpler to read.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(t testing.TB, expected string, value string)

func DeepEquals

func DeepEquals[T any](t testing.TB, expected, actual T)

func Equals

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

func ErrorIs

func ErrorIs(t testing.TB, expected, actual error)

func EventIs

func EventIs[T event.Event](t testing.TB, source event.Source, index int) (result T)

func HasLength

func HasLength[T any](t testing.TB, arr []T, length int)

func HasNChars

func HasNChars[T ~string](t testing.TB, expected int, value T)

func HasNEvents

func HasNEvents(t testing.TB, source event.Source, expected int)

func IsFalse

func IsFalse(t testing.TB, expr bool)

func IsNil

func IsNil(t testing.TB, expr any)

func IsNotNil

func IsNotNil(t testing.TB, expr any)

func IsTrue

func IsTrue(t testing.TB, expr bool)

func Match

func Match(t testing.TB, re string, value string)

func NotEquals

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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