Documentation
¶
Overview ¶
* package gotcha contains a set of common test assertions. It doesn't attempt to be any sort of fancy test library. Use the Assert() function to grab an Asserter, which has assertion methods
Index ¶
- func Equality(l, r interface{}) bool
- func Inequality(l, r interface{}) bool
- type Asserter
- func (a *Asserter) AreEqual(left, right interface{}, message string) *Asserter
- func (a *Asserter) AreNotEqual(left, right interface{}, message string) *Asserter
- func (a *Asserter) EachMatch(left []interface{}, right []interface{}, comparator Comparator, message string)
- func (a *Asserter) Fail(message string)
- func (a *Asserter) IsFalse(statement bool, message string) *Asserter
- func (a *Asserter) IsNil(subject interface{}, message string) *Asserter
- func (a *Asserter) IsNotNil(subject interface{}, message string) *Asserter
- func (a *Asserter) IsTrue(statement bool, message string) *Asserter
- func (a *Asserter) Matches(subject interface{}, matcher Matcher, message string)
- type Comparator
- type Failer
- type Matcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Inequality ¶
func Inequality(l, r interface{}) bool
Types ¶
type Asserter ¶
type Asserter struct {
// contains filtered or unexported fields
}
func (*Asserter) AreNotEqual ¶
func (*Asserter) EachMatch ¶
func (a *Asserter) EachMatch(left []interface{}, right []interface{}, comparator Comparator, message string)
type Comparator ¶
type Comparator func(interface{}, interface{}) bool
Click to show internal directories.
Click to hide internal directories.