test

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

This is a package that defines helper functions for writing unit tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsError

func ContainsError(expected error, got error, t *testing.T)

func Eq

func Eq(l any, r any, t *testing.T)

func False

func False(v bool, t *testing.T)

func FloatEq

func FloatEq[T ~float32 | float64](l T, r T, eps T, t *testing.T)

func FormatError

func FormatError(
	expected any,
	got any,
	base string,
	file string,
	line int,
	t *testing.T,
)

func MapsMatch

func MapsMatch[K comparable, V any](
	actual map[K]V,
	generated map[K]V,
	t *testing.T,
)

func Neq

func Neq(l any, r any, t *testing.T)

func Nil

func Nil(v any, t *testing.T)

func NilPntr

func NilPntr[T any](v *T, t *testing.T)

func NilSlice

func NilSlice[T any](v []T, t *testing.T)

func NoPanic

func NoPanic(action func(), t *testing.T)

func NotNil

func NotNil(v any, t *testing.T)

func NotNilPntr

func NotNilPntr[T any](v *T, t *testing.T)

func NotNilSlice

func NotNilSlice[T any](v []T, t *testing.T)

func Panics

func Panics(action func(), t *testing.T)

func SlicesMatch

func SlicesMatch[T any](actual []T, generated []T, t *testing.T)

func SlicesMatchUnordered

func SlicesMatchUnordered[T any](actual []T, generated []T, t *testing.T)

func True

func True(v bool, t *testing.T)

Types

This section is empty.

Jump to

Keyboard shortcuts

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