testutils

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckErr

func CheckErr[V any](v V, err error) V

CheckErr can be used to simplify test code that expects no errors. Instead of:

v, err := SomeFunc()
if err != nil { .. }

we can use:

v := testutils.CheckErr(someFunc())

func CheckErr2

func CheckErr2[V any, W any](v V, w W, err error) (V, W)

CheckErr2 can be used to simplify test code that expects no errors. Instead of:

v, w, err := SomeFunc()
if err != nil { .. }

we can use:

v, w := testutils.CheckErr2(someFunc())

func DurationIsAtLeast

func DurationIsAtLeast(t testing.TB, d, minValue time.Duration)

DurationIsAtLeast verifies that the given duration is at least the given value.

Types

This section is empty.

Directories

Path Synopsis
Package indenttree implements a simple text processor which parses a hierarchy defined using indentation; see Parse.
Package indenttree implements a simple text processor which parses a hierarchy defined using indentation; see Parse.

Jump to

Keyboard shortcuts

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