testing

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Between gocheck.Checker = &betweenChecker{
	&gocheck.CheckerInfo{
		Name:   "Between",
		Params: []string{"obtained", "lower", "upper"},
	},
}

Between Checker Check a value is between two values c.Assert(value Between, lowerBound, upperBound)

View Source
var Contains gocheck.Checker = &containsChecker{
	&gocheck.CheckerInfo{
		Name:   "Contains",
		Params: []string{"obtained", "expected"},
	},
}

Contains Checker Check whether a value is contained in string or slice

View Source
var EqualsWithin gocheck.Checker = &equalsWithinChecker{
	&gocheck.CheckerInfo{
		Name:   "EqualsWithin",
		Params: []string{"obtained", "expected", "tolerance"},
	},
}

EqualsWithin Checker For testing equality for floats c.Assert(value, EqualsWithin, expected, torerance)

View Source
var IsFalse gocheck.Checker = &isFalseChecker{
	&gocheck.CheckerInfo{
		Name:   "IsFalse",
		Params: []string{"obtained"},
	},
}

IsFalse Checker c.Assert(value, IsFalse)

View Source
var IsTrue gocheck.Checker = &isTrueChecker{
	&gocheck.CheckerInfo{
		Name:   "IsTrue",
		Params: []string{"obtained"},
	},
}

IsTrue Checker c.Assert(value, IsTrue)

Functions

func EqualsWithinTolerance

func EqualsWithinTolerance(a, b, tolerance float64) bool

func Float32InSlice

func Float32InSlice(list []float32, a float32) bool

func Float64InSlice

func Float64InSlice(list []float64, a float64) bool

func Int64InSlice

func Int64InSlice(list []int64, a int64) bool

func IntInSlice

func IntInSlice(list []int, a int) bool

func StringInSlice

func StringInSlice(list []string, a string) bool

func WithinBound

func WithinBound(value, lower, upper float64) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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