Documentation
¶
Overview ¶
Package assert - makes sure that 2 things are the same
Package assert - private utility functions to convert stuff to string ¶
Package assert - makes sure that one thing includes other ¶
Package assert utility for formating test failure messages ¶
Package assert private utility functions for error reporting
Index ¶
- func EqualDecimal(reporter interface{}, want, got decimal.Decimal)
- func EqualErrors(reporter interface{}, want, got error)
- func EqualFloat32(reporter interface{}, want, got float32)
- func EqualFloat32Tol(reporter interface{}, want, got, relTol float32)
- func EqualFloat64(reporter interface{}, want, got float64)
- func EqualFloat64Tol(reporter interface{}, want, got, relTol float64)
- func EqualInt(reporter interface{}, want, got int)
- func EqualStrings(reporter interface{}, want, got string)
- func EqualTime(reporter interface{}, want, got time.Time)
- func EqualTimeTol(reporter interface{}, want, got time.Time, relTol time.Duration)
- func ErrorIncludesMessage(reporter interface{}, expectedPhrase string, got error)
- func False(reporter interface{}, expression bool)
- func IncludesString(reporter interface{}, expectedPhrase, got string)
- func IsNil(reporter interface{}, got interface{})
- func NoError(reporter interface{}, got error)
- func Panic(reporter interface{}, withMessage string)
- func True(reporter interface{}, expression bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EqualDecimal ¶
EqualDecimal - asserts that two decimals are the same
func EqualErrors ¶
func EqualErrors(reporter interface{}, want, got error)
EqualErrors - asserts that specific error was produced
func EqualFloat32 ¶
func EqualFloat32(reporter interface{}, want, got float32)
EqualFloat32 - asserts that two floats are the same
func EqualFloat32Tol ¶
func EqualFloat32Tol(reporter interface{}, want, got, relTol float32)
EqualFloat32Tol - asserts that two floats are the same, allowing for (relative) tolerance given as a parameter
func EqualFloat64 ¶
func EqualFloat64(reporter interface{}, want, got float64)
EqualFloat64 - asserts that two floats are the same
func EqualFloat64Tol ¶
func EqualFloat64Tol(reporter interface{}, want, got, relTol float64)
EqualFloat64Tol - asserts that two floats are the same, allowing for (relative) tolerance given as a parameter
func EqualInt ¶
func EqualInt(reporter interface{}, want, got int)
EqualInt - asserts that two integers are the same
func EqualStrings ¶
func EqualStrings(reporter interface{}, want, got string)
EqualStrings - asserts that two strings are equal
func EqualTimeTol ¶
EqualTimeTol - asserts that two time.Time are the same, allowing for (relative) tolerance given as a parameter
func ErrorIncludesMessage ¶
ErrorIncludesMessage - asserts that received error includes particular string in the message
func False ¶
func False(reporter interface{}, expression bool)
False - asserts that passed expression is evaluated to false
func IncludesString ¶
func IncludesString(reporter interface{}, expectedPhrase, got string)
IncludesString - asserts that string includes substring
func IsNil ¶
func IsNil(reporter interface{}, got interface{})
IsNil - asserts that provided interface has nil value
func NoError ¶
func NoError(reporter interface{}, got error)
NoError - asserts that no error was produced
Types ¶
This section is empty.