assert

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

README

assert

assert is an assertion library for Go.

Installation

go get github.com/crdx/assert

Methods

All methods return a bool indicating test success or failure.

Equal(t, actual, expected)

Assert that actual == expected.

NotEqual(t, actual, expected)

Assert that actual != expected.

True(t, condition)

Assert that condition is true.

Truef(t, condition, format, ...args)

Assert that condition is true, and show a custom message if not.

Contributions

Open an issue or send a pull request.

Licence

GPLv3.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(t *testing.T, actual interface{}, expected interface{}) bool

func NotEqual

func NotEqual(t *testing.T, actual interface{}, expected interface{}) bool

func True

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

func Truef

func Truef(t *testing.T, condition bool, format string, args ...interface{}) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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