require

package
v4.0.0-...-b8b0360 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepEqual

func DeepEqual(tb assertions.AssertionTestingTB, expected, actual interface{}, msg ...interface{})

DeepEqual compares values using DeepEqual. NOTE: this function does not work for checking arrays/slices or maps of protobuf messages. For arrays/slices, please use DeepSSZEqual. For maps, please iterate through and compare the individual keys and values.

func DeepNotEqual

func DeepNotEqual(tb assertions.AssertionTestingTB, expected, actual interface{}, msg ...interface{})

DeepNotEqual compares values using DeepEqual. NOTE: this function does not work for checking arrays/slices or maps of protobuf messages. For arrays/slices, please use DeepNotSSZEqual. For maps, please iterate through and compare the individual keys and values.

func DeepNotSSZEqual

func DeepNotSSZEqual(tb assertions.AssertionTestingTB, expected, actual interface{}, msg ...interface{})

DeepNotSSZEqual compares values using DeepEqual.

func DeepSSZEqual

func DeepSSZEqual(tb assertions.AssertionTestingTB, expected, actual interface{}, msg ...interface{})

DeepSSZEqual compares values using DeepEqual.

func Equal

func Equal(tb assertions.AssertionTestingTB, expected, actual interface{}, msg ...interface{})

Equal compares values using comparison operator.

func ErrorContains

func ErrorContains(tb assertions.AssertionTestingTB, want string, err error, msg ...interface{})

ErrorContains asserts that actual error contains wanted message.

func ErrorIs

func ErrorIs(tb assertions.AssertionTestingTB, err, target error, msg ...interface{})

ErrorIs uses Errors.Is to recursively unwrap err looking for target in the chain. If any error in the chain matches target, the assertion will pass.

func LogsContain

func LogsContain(tb assertions.AssertionTestingTB, hook *test.Hook, want string, msg ...interface{})

LogsContain checks that the desired string is a subset of the current log output.

func LogsDoNotContain

func LogsDoNotContain(tb assertions.AssertionTestingTB, hook *test.Hook, want string, msg ...interface{})

LogsDoNotContain is the inverse check of LogsContain.

func NoError

func NoError(tb assertions.AssertionTestingTB, err error, msg ...interface{})

NoError asserts that error is nil.

func NotEmpty

func NotEmpty(tb assertions.AssertionTestingTB, obj interface{}, msg ...interface{})

NotEmpty checks that the object fields are not empty. This method also checks all of the pointer fields to ensure none of those fields are empty.

func NotEqual

func NotEqual(tb assertions.AssertionTestingTB, expected, actual interface{}, msg ...interface{})

NotEqual compares values using comparison operator.

func NotNil

func NotNil(tb assertions.AssertionTestingTB, obj interface{}, msg ...interface{})

NotNil asserts that passed value is not nil.

func StringContains

func StringContains(tb assertions.AssertionTestingTB, expected, actual string, msg ...interface{})

StringContains asserts that actual string contains expected message.

Types

This section is empty.

Jump to

Keyboard shortcuts

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