assert

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Assert provides useful utilities for writing unit tests.

Assert wraps the standard testing.T type to implement its utilities on that type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T

type T testing.T

func (*T) Equals

func (t *T) Equals(a interface{}, b interface{})

Asserts that A and B are Equal.

Example:

(*assert.T)(t).Equals(10, 10)

func (*T) Nil

func (t *T) Nil(a interface{})

Asserts that A is Nil

Example:

(*assert.T)(t).Nil(nil)

func (*T) NotEquals

func (t *T) NotEquals(a interface{}, b interface{})

Asserts that A and B are Not Equal.

Example:

(*assert.T)(t).NotEquals(10, 5)

func (*T) NotNil

func (t *T) NotNil(a interface{})

Asserts that A is not Nil

Example:

(*assert.T)(t).NotNil([]string{"hello", "world"})

Jump to

Keyboard shortcuts

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