Documentation ¶
Overview ¶
Package assert contains a system-specific wrapper for testify assertions
Index ¶
- Constants
- type Any
- type Wrapper
- func (w *Wrapper) Compare(c data.Comparison, l data.Number, r data.Number)
- func (w *Wrapper) Contains(expect string, expr data.Value)
- func (w *Wrapper) Equal(expect Any, expr Any)
- func (w *Wrapper) Eval(src string) data.Value
- func (w *Wrapper) EvalTo(src string, expect data.Value)
- func (w *Wrapper) ExpectNoPanic()
- func (w *Wrapper) ExpectPanic(errStr string)
- func (w *Wrapper) False(expr Any)
- func (w *Wrapper) Falsey(expr data.Value)
- func (w *Wrapper) Identical(expect Any, expr Any)
- func (w *Wrapper) NotContains(expect string, expr data.Value)
- func (w *Wrapper) NotIdentical(expect Any, expr Any)
- func (w *Wrapper) Number(expect float64, expr Any)
- func (w *Wrapper) PanicWith(src string, err error)
- func (w *Wrapper) String(expect string, expr Any)
- func (w *Wrapper) True(expr Any)
- func (w *Wrapper) Truthy(expr data.Value)
Constants ¶
View Source
const (
InvalidTestExpression = "invalid test expression: %v"
)
Error messages
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Wrapper ¶
type Wrapper struct {
*assert.Assertions
}
Wrapper wraps the testify assertions module in order to perform checking and conversion that is system-specific
func (*Wrapper) ExpectNoPanic ¶
func (w *Wrapper) ExpectNoPanic()
ExpectNoPanic is sued with a defer to make sure no error was triggered
func (*Wrapper) ExpectPanic ¶
ExpectPanic is used with a defer to make sure an error was triggered
func (*Wrapper) NotContains ¶
NotContains checks if the expected string is not in the provided Value
func (*Wrapper) NotIdentical ¶
NotIdentical tests that two values are not referentially identical
Click to show internal directories.
Click to hide internal directories.