testutils

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertAnyStringContains added in v1.2.1

func AssertAnyStringContains(t *testing.T, expectedContained string, actualContaining []string)

func AssertEqual

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

AssertEqual is a semantic test assertion for object equality.

func AssertFalse

func AssertFalse(t *testing.T, object bool)

AssertFalse is a semantic test assertion for object truthiness.

func AssertNearEqual

func AssertNearEqual(t *testing.T, expected int64, actual int64, delta int64)

AssertNearEqual is a semantic test assertion for numeric accuracy.

func AssertNil

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

AssertNil is a semantic test assertion for nility.

func AssertNotEqual

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

AssertNotEqual is a semantic test assertion for object equality.

func AssertNotNil

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

AssertNotNil is a semantic test assertion for nility.

func AssertNotPanics added in v1.1.0

func AssertNotPanics(t *testing.T, fn func())

AssertNotPanics is a semantic test assertion that a function does not panic.

func AssertNotSame

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

AssertNotSame is a semantic test assertion for referential equality.

func AssertSame

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

AssertSame is a semantic test assertion for referential equality.

func AssertStringContains

func AssertStringContains(t *testing.T, expectedContained string, actualContaining string)

AssertStringContains is a semantic test assertion for partial string matching.

func AssertTrue

func AssertTrue(t *testing.T, object bool)

AssertTrue is a semantic test assertion for object truthiness.

func NewConfigWithBuffer

func NewConfigWithBuffer(t *testing.T, logLevel log.Level) (*log.Config, *bytes.Buffer)

NewConfigWithBuffer generates a default testing config (log.Level is set to log.INFO and EnableErrStack is true) and a linked output buffer that the logger writes too.

Types

This section is empty.

Jump to

Keyboard shortcuts

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