testutil

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertContains

func AssertContains(t *testing.T, s, substr string, message ...interface{})

AssertContains asserts an argument contains a given substring.

func AssertEmpty

func AssertEmpty(t *testing.T, arg interface{}, message ...interface{})

AssertEmpty asserts an argument is empty.

func AssertEqual

func AssertEqual(t *testing.T, expected, actual interface{}, message ...interface{})

AssertEqual asserts two arguments are equal.

func AssertFalse

func AssertFalse(t *testing.T, arg bool, message ...interface{})

AssertFalse asserts an argument is false.

func AssertInDelta

func AssertInDelta(t *testing.T, from, to, delta float64, message ...interface{})

AssertInDelta asserts a two arguments are within a delta of eachother.

This delta will be determined absolute, and the delta should always be positive.

func AssertLen

func AssertLen(t *testing.T, arg interface{}, length int, message ...interface{})

AssertLen asserts an argument has a given length.

func AssertNil

func AssertNil(t *testing.T, actual interface{})

AssertNil asserts an argument is nil.

func AssertNotContains

func AssertNotContains(t *testing.T, s, substr string, message ...interface{})

AssertNotContains asserts an argument does not contain a given substring.

func AssertNotEmpty

func AssertNotEmpty(t *testing.T, arg interface{}, message ...interface{})

AssertNotEmpty asserts an argument is not empty.

func AssertNotEqual

func AssertNotEqual(t *testing.T, expected, actual interface{}, message ...interface{})

AssertNotEqual asserts two arguments are not equal.

func AssertNotNil

func AssertNotNil(t *testing.T, actual interface{}, message ...interface{})

AssertNotNil asserts an argument is not nil.

func AssertNotZero

func AssertNotZero(t *testing.T, actual interface{}, message ...interface{})

AssertNotZero asserts an argument is not zero.

func AssertTrue

func AssertTrue(t *testing.T, arg bool, message ...interface{})

AssertTrue asserts an argument is true.

func AssertZero

func AssertZero(t *testing.T, actual interface{}, message ...interface{})

AssertZero asserts an argument is zero.

Types

This section is empty.

Jump to

Keyboard shortcuts

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