assert

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2019 License: MIT Imports: 3 Imported by: 0

README

assert

Godoc Report Tests Coverage Sponsor

A minimal & stateless assert package for writing tests.

API

assert.Nil(t, nil)
assert.True(t, true)
assert.Equal(t, "Hello", "Hello")
assert.DeepEqual(t, "Hello", "Hello")
assert.Contains(t, "Hello", "ello")

Style

Please take a look at the style guidelines if you'd like to make a pull request.

Sponsors

Cedric Fung Scott Rayapoullé Eduard Urbach
Cedric Fung Scott Rayapoullé Eduard Urbach

Want to see your own name here?

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(t *testing.T, a interface{}, b interface{})

Contains asserts that a contains b.

func DeepEqual added in v0.1.2

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

DeepEqual asserts that the two parameters are deeply equal.

func Equal

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

Equal asserts that the two parameters are equal.

func False added in v0.2.0

func False(t *testing.T, a interface{})

False asserts that the given parameter is false.

func Nil

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

Nil asserts that the given parameter equals nil.

func NotContains

func NotContains(t *testing.T, a interface{}, b interface{})

NotContains asserts that a doesn't contain b.

func NotEqual

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

NotEqual asserts that the two parameters are equal.

func NotNil

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

NotNil asserts that the given parameter does not equal nil.

func True added in v0.2.0

func True(t *testing.T, a interface{})

True asserts that the given parameter is true.

Types

This section is empty.

Jump to

Keyboard shortcuts

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