assert

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package assert provides functions to compare actual and expected test values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmptyString

func EmptyString(t *testing.T, actual string)

EmptyString compares an actual string value and the empty string for equality.

func False

func False(t *testing.T, actual bool)

False compares a bool value to false.

func Int32sAreEqual

func Int32sAreEqual(t *testing.T, expected int32, actual int32)

Int32sAreEqual compares an expected int32 value and an actual int32 value for equality.

func Int64sAreEqual

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

Int64sAreEqual compares an expected int64 value and an actual int64 value for equality.

func IntsAreEqual

func IntsAreEqual(t *testing.T, expected int, actual int)

IntsAreEqual compares an expected int value and an actual int value for equality.

func Nil

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

Nil compares an interface and nil for inequality.

func NilError

func NilError(t *testing.T, err error)

NilError compares an error and nil.

func NotNil

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

NotNil compares an interface and nil for equality.

func StringContains

func StringContains(t *testing.T, expectedContains string, actual string)

StringContains compares an expected string and an actual string value for a substring.

func StringNotContains

func StringNotContains(t *testing.T, expectedNotContains string, actual string)

StringNotContains compares an expected string and an actual string value for a missing substring.

func StringPrefix

func StringPrefix(t *testing.T, expectedPrefix string, actual string)

StringPrefix compares an expected string value and an actual string value for a prefix match.

func StringsAreEqual

func StringsAreEqual(t *testing.T, expected string, actual string)

StringsAreEqual compares an expected string value and an actual string value for equality.

func True

func True(t *testing.T, actual bool)

True compares a bool value to false.

Types

This section is empty.

Jump to

Keyboard shortcuts

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