minitest

package
v0.5.11 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package minitest provides some testing functions for the hit package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(object interface{}, values ...interface{}) error

Contains returns an error when the passed in object does not not contain the expected values.

func Empty

func Empty(object interface{}) error

Empty returns an error when the passed in object is not empty.

func Equal

func Equal(object, expected interface{}) error

Equal returns an error when the passed in object is equal to the expected value.

func Errorf

func Errorf(format string, messageAndArgs ...interface{}) error

Errorf returns an error with the format and the specified message and args.

func False

func False(value bool) error

False returns an error when the passed in object is true.

func Format

func Format(message, data string, colors ...color.Color) string

Format formats an message by making sure the passed in data is nicely indented.

func Len

func Len(object interface{}, length int) error

Len returns an error when the passed in object is not matching the passed in length.

func NoError

func NoError(err error) error

NoError returns an error if err is an error.

func NotContains

func NotContains(object interface{}, values ...interface{}) error

NotContains returns an error when the passed in object contains the expected values.

func NotEmpty added in v0.5.3

func NotEmpty(object interface{}) error

NotEmpty returns an error when the passed in object is empty.

func NotEqual

func NotEqual(object interface{}, values ...interface{}) error

NotEqual returns an error when the passed in object is not equal to the expected value.

func NotOneOf added in v0.5.3

func NotOneOf(object interface{}, values ...interface{}) error

NotOneOf returns an error when the passed in object does not contain one of the specified values.

func OneOf added in v0.5.3

func OneOf(object interface{}, values ...interface{}) error

OneOf returns an error when the passed in object contains one of the specified values.

func PrintValue

func PrintValue(v interface{}) string

PrintValue prints the specified value in a nice way.

func True

func True(value bool) error

True returns an error when the passed in object is false.

Types

This section is empty.

Directories

Path Synopsis
Package contains provides functions to check if a needle is in an haystack.
Package contains provides functions to check if a needle is in an haystack.

Jump to

Keyboard shortcuts

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