tests

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Spec

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

Spec is an access point to test Expections

func S

func S(t *testing.T) *Spec

S generates a spec. You will want to use it once in a test file, once in a test or once per each check

func (*Spec) ExpectEquals

func (spec *Spec) ExpectEquals(actual, value interface{})

ExpectEquals expects given values to be equal (comparison via `==`), or errors

func (*Spec) ExpectEqualsAny

func (spec *Spec) ExpectEqualsAny(actual interface{}, values ...interface{})

ExpectEqualsAny expects given actual to equal (comparison via `==`) at least one of given values, or errors

func (*Spec) ExpectFalse

func (spec *Spec) ExpectFalse(actual interface{})

ExpectFalse expects given values to be false, or errors

func (*Spec) ExpectNil

func (spec *Spec) ExpectNil(actual interface{})

ExpectNil expects given value to be nil, or errors

func (*Spec) ExpectNotEquals

func (spec *Spec) ExpectNotEquals(actual, value interface{})

ExpectNotEquals expects given values to be nonequal (comparison via `==`), or errors

func (*Spec) ExpectNotEqualsAny

func (spec *Spec) ExpectNotEqualsAny(actual interface{}, values ...interface{})

ExpectNotEqualsAny expects given actual to be nonequal (comparison via `==`)tp any of given values, or errors

func (*Spec) ExpectNotNil

func (spec *Spec) ExpectNotNil(actual interface{})

ExpectNotNil expects given value to be not nil, or errors

func (*Spec) ExpectTrue

func (spec *Spec) ExpectTrue(actual interface{})

ExpectTrue expects given values to be true, or errors

Jump to

Keyboard shortcuts

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