assert

package
v0.0.0-...-1cfd4fd Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package assert provides functions to assert a condition in tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepEqual

func DeepEqual(t *testing.T, a, b interface{}, message string)

DeepEqual fails a test if the actual does not deeply equal the expected

func Equal

func Equal(t *testing.T, a, b interface{}, message string)

Equal errors a test if the actual does not match the expected

func EqualJSON

func EqualJSON(t *testing.T, a, b, message string)

EqualJSON asserts that two JSON strings are equal

func Equalf

func Equalf(t *testing.T, a, b interface{}, message string)

Equalf fails a test if the actual does not match the expected

func NotEqual

func NotEqual(t *testing.T, a, b interface{}, message string)

NotEqual fails a test if the actual matches the expected

func NotEqualf

func NotEqualf(t *testing.T, a, b interface{}, message string)

NotEqualf fails a test if the actual matches the expected

func StatusCodeEquals

func StatusCodeEquals(t *testing.T, res *http.Response, expected int, message string)

StatusCodeEquals asserts that the reponse's status code is equal to the expected

Types

This section is empty.

Jump to

Keyboard shortcuts

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