Documentation ¶
Index ¶
- type Assertion
- func (this *Assertion) Between(value interface{}, min interface{}, max interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) Contains(container interface{}, item interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) Cost() *Assertion
- func (this *Assertion) Equals(value1 interface{}, value2 interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) Fail(msg ...interface{}) *Assertion
- func (this *Assertion) Fatal(msg ...interface{}) *Assertion
- func (this *Assertion) Gt(value interface{}, compare interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) Gte(value interface{}, compare interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsBool(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsFalse(value bool, msg ...interface{}) *Assertion
- func (this *Assertion) IsFloat(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsFloat32(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsFloat64(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsInt(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsInt16(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsInt32(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsInt64(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsInt8(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsInteger(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsKind(value interface{}, kind reflect.Kind, msg ...interface{}) *Assertion
- func (this *Assertion) IsMap(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsNaN(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsNil(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsNotEmpty(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsNotError(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsNotNil(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsNumber(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsSlice(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsString(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsTrue(value bool, msg ...interface{}) *Assertion
- func (this *Assertion) IsUint(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsUint16(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsUint32(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsUint64(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) IsUint8(value interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) Log(msg ...interface{}) *Assertion
- func (this *Assertion) LogJSON(msg ...interface{}) *Assertion
- func (this *Assertion) Logf(format string, args ...interface{}) *Assertion
- func (this *Assertion) Lt(value interface{}, compare interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) Lte(value interface{}, compare interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) Match(pattern string, value string, msg ...interface{}) *Assertion
- func (this *Assertion) NoPanic(f func(), msg ...interface{}) *Assertion
- func (this *Assertion) NotEquals(value1 interface{}, value2 interface{}, msg ...interface{}) *Assertion
- func (this *Assertion) NotTimeout(duration time.Duration, f func(), msg ...interface{}) *Assertion
- func (this *Assertion) Panic(f func(), msg ...interface{}) *Assertion
- func (this *Assertion) Pass(msg ...interface{}) *Assertion
- func (this *Assertion) Quiet(isQuiet ...bool) *Assertion
- func (this *Assertion) Then(f func()) *Assertion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assertion ¶
type Assertion struct {
// contains filtered or unexported fields
}
Assertion 断言定义
func (*Assertion) Between ¶
func (this *Assertion) Between(value interface{}, min interface{}, max interface{}, msg ...interface{}) *Assertion
Between 检查是否在两个数字之间
func (*Assertion) Contains ¶
func (this *Assertion) Contains(container interface{}, item interface{}, msg ...interface{}) *Assertion
Contains 检查是否包含某个条目,目前只支持slice
func (*Assertion) Equals ¶
func (this *Assertion) Equals(value1 interface{}, value2 interface{}, msg ...interface{}) *Assertion
Equals 检查是否相等
func (*Assertion) IsNotEmpty ¶
IsNotEmpty 检查是否为非空
func (*Assertion) IsNotError ¶
IsNotError 检查是否为非error
func (*Assertion) NotEquals ¶
func (this *Assertion) NotEquals(value1 interface{}, value2 interface{}, msg ...interface{}) *Assertion
NotEquals 检查是否不相等
func (*Assertion) NotTimeout ¶
NotTimeout 检查执行时间是否超时
Click to show internal directories.
Click to hide internal directories.