compare

package
v1.73.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Collection of comparison functions used in testing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OkEqualBool

func OkEqualBool(label string, a, b bool, t *testing.T)

Compares two booleans

func OkEqualByteSlices

func OkEqualByteSlices(t *testing.T, found, expected []byte)

Compares two byte slices

func OkEqualInt

func OkEqualInt(label string, a, b int, t *testing.T)

Compares two integers

func OkEqualIntSlices

func OkEqualIntSlices(t *testing.T, found, expected []int)

Compares two integer slices

func OkEqualInterface added in v1.32.0

func OkEqualInterface(label string, a, b interface{}, t *testing.T)

Compares two empty interfaces

func OkEqualString

func OkEqualString(label, a, b string, t *testing.T)

Compares two strings

func OkEqualStringSlices

func OkEqualStringSlices(t *testing.T, found, expected []string)

Compares two string slices

func OkIsNil

func OkIsNil(label string, val interface{}, t *testing.T)

func OkIsNotNil

func OkIsNotNil(label string, val interface{}, t *testing.T)

func OkMatchesString

func OkMatchesString(label, val, regex string, t *testing.T)

Checks that a string matches a given regular expression

func OkNotEmptyString added in v1.28.0

func OkNotEmptyString(label, a string, t *testing.T)

Checks whether a string is not empty

func SkipOnDemand added in v1.19.0

func SkipOnDemand(envVar string, 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