minitest

package
v0.5.22 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 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 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 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.

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