assertions

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: CC0-1.0 Imports: 2 Imported by: 0

README

assertions

Package assertions provides simple helpers for writing Go tests.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type A

type A struct {
	// contains filtered or unexported fields
}

A is the test harness.

func New added in v0.2.0

func New(t T) (assert *A)

func (*A) Equal

func (assert *A) Equal(have, want interface{}, msg string)

func (*A) Equalf

func (assert *A) Equalf(have, want interface{}, format string, a ...interface{})

func (*A) Lax added in v0.2.0

func (assert *A) Lax(fn func(assert *A))

func (*A) NoError

func (assert *A) NoError(err error, msg string)

func (*A) NoErrorf

func (assert *A) NoErrorf(err error, format string, a ...interface{})

func (*A) True

func (assert *A) True(expr bool, msg string)

func (*A) Truef

func (assert *A) Truef(expr bool, format string, a ...interface{})

type T

type T interface {
	Helper()
	Logf(format string, args ...interface{})
	Fail()
	FailNow()
	Failed() bool
}

T is a subset of interface testing.TB.

Source Files

  • assertions.go

Jump to

Keyboard shortcuts

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