Documentation ¶
Index ¶
- type BeEmptyMatcher
- type BeEquivalentToMatcher
- type BeFalseMatcher
- type BeIdenticalToMatcher
- type BeNilMatcher
- type BeNumericallyMatcher
- func (m BeNumericallyMatcher) GetOp() token.Token
- func (m BeNumericallyMatcher) GetType() gotypes.Type
- func (m BeNumericallyMatcher) GetValue() constant.Value
- func (m BeNumericallyMatcher) GetValueExpr() ast.Expr
- func (m BeNumericallyMatcher) IsError() bool
- func (m BeNumericallyMatcher) IsFunc() bool
- func (m BeNumericallyMatcher) IsInterface() bool
- func (m BeNumericallyMatcher) IsPointer() bool
- func (m BeNumericallyMatcher) IsValueInt() bool
- func (m BeNumericallyMatcher) IsValueNumeric() bool
- func (m BeNumericallyMatcher) IsValueZero() bool
- func (BeNumericallyMatcher) MatcherName() string
- func (m BeNumericallyMatcher) Type() Type
- type BeTrueMatcher
- type BeZeroMatcher
- type EqualFalseMatcher
- type EqualMatcher
- func (m EqualMatcher) GetType() gotypes.Type
- func (m EqualMatcher) GetValue() constant.Value
- func (m EqualMatcher) GetValueExpr() ast.Expr
- func (m EqualMatcher) IsError() bool
- func (m EqualMatcher) IsFunc() bool
- func (m EqualMatcher) IsInterface() bool
- func (m EqualMatcher) IsPointer() bool
- func (m EqualMatcher) IsValueInt() bool
- func (m EqualMatcher) IsValueNumeric() bool
- func (m EqualMatcher) IsValueZero() bool
- func (EqualMatcher) MatcherName() string
- func (EqualMatcher) Type() Type
- type EqualNilMatcher
- type EqualTrueMatcher
- type HaveLenZeroMatcher
- type HaveOccurredMatcher
- type HaveValueMatcher
- type Info
- type InvalidMatchErrorMatcher
- type MatchErrorMatcher
- type MatchErrorMatcherWithErr
- type MatchErrorMatcherWithErrFunc
- type MatchErrorMatcherWithMatcher
- type MatchErrorMatcherWithString
- type Matcher
- type MultipleMatchersMatcher
- type SucceedMatcher
- type Type
- type UnspecifiedMatcher
- type WithTransformMatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeEmptyMatcher ¶
type BeEmptyMatcher struct{}
func (BeEmptyMatcher) MatcherName ¶
func (BeEmptyMatcher) MatcherName() string
func (BeEmptyMatcher) Type ¶
func (BeEmptyMatcher) Type() Type
type BeEquivalentToMatcher ¶
func (BeEquivalentToMatcher) MatcherName ¶
func (BeEquivalentToMatcher) MatcherName() string
func (BeEquivalentToMatcher) Type ¶
func (BeEquivalentToMatcher) Type() Type
type BeFalseMatcher ¶
type BeFalseMatcher struct{}
func (BeFalseMatcher) MatcherName ¶
func (BeFalseMatcher) MatcherName() string
func (BeFalseMatcher) Type ¶
func (BeFalseMatcher) Type() Type
type BeIdenticalToMatcher ¶
func (BeIdenticalToMatcher) MatcherName ¶
func (BeIdenticalToMatcher) MatcherName() string
func (BeIdenticalToMatcher) Type ¶
func (BeIdenticalToMatcher) Type() Type
type BeNilMatcher ¶
type BeNilMatcher struct{}
func (BeNilMatcher) MatcherName ¶
func (BeNilMatcher) MatcherName() string
func (BeNilMatcher) Type ¶
func (BeNilMatcher) Type() Type
type BeNumericallyMatcher ¶
type BeNumericallyMatcher struct {
// contains filtered or unexported fields
}
func (BeNumericallyMatcher) GetOp ¶
func (m BeNumericallyMatcher) GetOp() token.Token
func (BeNumericallyMatcher) GetType ¶
func (m BeNumericallyMatcher) GetType() gotypes.Type
func (BeNumericallyMatcher) GetValue ¶
func (m BeNumericallyMatcher) GetValue() constant.Value
func (BeNumericallyMatcher) GetValueExpr ¶
func (m BeNumericallyMatcher) GetValueExpr() ast.Expr
func (BeNumericallyMatcher) IsError ¶
func (m BeNumericallyMatcher) IsError() bool
func (BeNumericallyMatcher) IsFunc ¶
func (m BeNumericallyMatcher) IsFunc() bool
func (BeNumericallyMatcher) IsInterface ¶
func (m BeNumericallyMatcher) IsInterface() bool
func (BeNumericallyMatcher) IsPointer ¶
func (m BeNumericallyMatcher) IsPointer() bool
func (BeNumericallyMatcher) IsValueInt ¶
func (m BeNumericallyMatcher) IsValueInt() bool
func (BeNumericallyMatcher) IsValueNumeric ¶
func (m BeNumericallyMatcher) IsValueNumeric() bool
func (BeNumericallyMatcher) IsValueZero ¶
func (m BeNumericallyMatcher) IsValueZero() bool
func (BeNumericallyMatcher) MatcherName ¶
func (BeNumericallyMatcher) MatcherName() string
func (BeNumericallyMatcher) Type ¶
func (m BeNumericallyMatcher) Type() Type
type BeTrueMatcher ¶
type BeTrueMatcher struct{}
func (BeTrueMatcher) MatcherName ¶
func (BeTrueMatcher) MatcherName() string
func (BeTrueMatcher) Type ¶
func (BeTrueMatcher) Type() Type
type BeZeroMatcher ¶
type BeZeroMatcher struct{}
func (BeZeroMatcher) MatcherName ¶
func (BeZeroMatcher) MatcherName() string
func (BeZeroMatcher) Type ¶
func (BeZeroMatcher) Type() Type
type EqualFalseMatcher ¶
type EqualFalseMatcher struct{}
func (EqualFalseMatcher) MatcherName ¶
func (EqualFalseMatcher) MatcherName() string
func (EqualFalseMatcher) Type ¶
func (EqualFalseMatcher) Type() Type
type EqualMatcher ¶
type EqualMatcher struct {
// contains filtered or unexported fields
}
func (EqualMatcher) GetType ¶
func (m EqualMatcher) GetType() gotypes.Type
func (EqualMatcher) GetValue ¶
func (m EqualMatcher) GetValue() constant.Value
func (EqualMatcher) GetValueExpr ¶
func (m EqualMatcher) GetValueExpr() ast.Expr
func (EqualMatcher) IsError ¶
func (m EqualMatcher) IsError() bool
func (EqualMatcher) IsFunc ¶
func (m EqualMatcher) IsFunc() bool
func (EqualMatcher) IsInterface ¶
func (m EqualMatcher) IsInterface() bool
func (EqualMatcher) IsPointer ¶
func (m EqualMatcher) IsPointer() bool
func (EqualMatcher) IsValueInt ¶
func (m EqualMatcher) IsValueInt() bool
func (EqualMatcher) IsValueNumeric ¶
func (m EqualMatcher) IsValueNumeric() bool
func (EqualMatcher) IsValueZero ¶
func (m EqualMatcher) IsValueZero() bool
func (EqualMatcher) MatcherName ¶
func (EqualMatcher) MatcherName() string
func (EqualMatcher) Type ¶
func (EqualMatcher) Type() Type
type EqualNilMatcher ¶
type EqualNilMatcher struct {
// contains filtered or unexported fields
}
func (EqualNilMatcher) GetType ¶
func (n EqualNilMatcher) GetType() gotypes.Type
func (EqualNilMatcher) MatcherName ¶
func (EqualNilMatcher) MatcherName() string
func (EqualNilMatcher) Type ¶
func (EqualNilMatcher) Type() Type
type EqualTrueMatcher ¶
type EqualTrueMatcher struct{}
func (EqualTrueMatcher) MatcherName ¶
func (EqualTrueMatcher) MatcherName() string
func (EqualTrueMatcher) Type ¶
func (EqualTrueMatcher) Type() Type
type HaveLenZeroMatcher ¶
type HaveLenZeroMatcher struct{}
func (HaveLenZeroMatcher) MatcherName ¶
func (HaveLenZeroMatcher) MatcherName() string
func (HaveLenZeroMatcher) Type ¶
func (HaveLenZeroMatcher) Type() Type
type HaveOccurredMatcher ¶ added in v0.18.0
type HaveOccurredMatcher struct{}
func (*HaveOccurredMatcher) MatcherName ¶ added in v0.18.0
func (m *HaveOccurredMatcher) MatcherName() string
func (*HaveOccurredMatcher) Type ¶ added in v0.18.0
func (m *HaveOccurredMatcher) Type() Type
type HaveValueMatcher ¶
type HaveValueMatcher struct {
// contains filtered or unexported fields
}
func (*HaveValueMatcher) GetNested ¶
func (m *HaveValueMatcher) GetNested() *Matcher
func (*HaveValueMatcher) MatcherName ¶
func (m *HaveValueMatcher) MatcherName() string
func (*HaveValueMatcher) Type ¶
func (m *HaveValueMatcher) Type() Type
type InvalidMatchErrorMatcher ¶
type InvalidMatchErrorMatcher struct {
// contains filtered or unexported fields
}
func (*InvalidMatchErrorMatcher) AllowedNumArgs ¶
func (m *InvalidMatchErrorMatcher) AllowedNumArgs() int
func (*InvalidMatchErrorMatcher) GetValueExpr ¶
func (m *InvalidMatchErrorMatcher) GetValueExpr() ast.Expr
func (*InvalidMatchErrorMatcher) MatcherName ¶
func (m *InvalidMatchErrorMatcher) MatcherName() string
func (*InvalidMatchErrorMatcher) NumArgs ¶
func (m *InvalidMatchErrorMatcher) NumArgs() int
func (*InvalidMatchErrorMatcher) Type ¶
func (m *InvalidMatchErrorMatcher) Type() Type
type MatchErrorMatcher ¶
type MatchErrorMatcherWithErr ¶
type MatchErrorMatcherWithErr struct {
// contains filtered or unexported fields
}
func (*MatchErrorMatcherWithErr) AllowedNumArgs ¶
func (m *MatchErrorMatcherWithErr) AllowedNumArgs() int
func (*MatchErrorMatcherWithErr) MatcherName ¶
func (m *MatchErrorMatcherWithErr) MatcherName() string
func (*MatchErrorMatcherWithErr) NumArgs ¶
func (m *MatchErrorMatcherWithErr) NumArgs() int
func (*MatchErrorMatcherWithErr) Type ¶
func (m *MatchErrorMatcherWithErr) Type() Type
type MatchErrorMatcherWithErrFunc ¶
type MatchErrorMatcherWithErrFunc struct {
// contains filtered or unexported fields
}
func (*MatchErrorMatcherWithErrFunc) AllowedNumArgs ¶
func (m *MatchErrorMatcherWithErrFunc) AllowedNumArgs() int
func (*MatchErrorMatcherWithErrFunc) IsSecondArgString ¶
func (m *MatchErrorMatcherWithErrFunc) IsSecondArgString() bool
func (*MatchErrorMatcherWithErrFunc) MatcherName ¶
func (m *MatchErrorMatcherWithErrFunc) MatcherName() string
func (*MatchErrorMatcherWithErrFunc) NumArgs ¶
func (m *MatchErrorMatcherWithErrFunc) NumArgs() int
func (*MatchErrorMatcherWithErrFunc) Type ¶
func (m *MatchErrorMatcherWithErrFunc) Type() Type
type MatchErrorMatcherWithMatcher ¶
type MatchErrorMatcherWithMatcher struct {
// contains filtered or unexported fields
}
func (*MatchErrorMatcherWithMatcher) AllowedNumArgs ¶
func (m *MatchErrorMatcherWithMatcher) AllowedNumArgs() int
func (*MatchErrorMatcherWithMatcher) MatcherName ¶
func (m *MatchErrorMatcherWithMatcher) MatcherName() string
func (*MatchErrorMatcherWithMatcher) NumArgs ¶
func (m *MatchErrorMatcherWithMatcher) NumArgs() int
func (*MatchErrorMatcherWithMatcher) Type ¶
func (m *MatchErrorMatcherWithMatcher) Type() Type
type MatchErrorMatcherWithString ¶
type MatchErrorMatcherWithString struct {
// contains filtered or unexported fields
}
func (*MatchErrorMatcherWithString) AllowedNumArgs ¶
func (m *MatchErrorMatcherWithString) AllowedNumArgs() int
func (*MatchErrorMatcherWithString) MatcherName ¶
func (m *MatchErrorMatcherWithString) MatcherName() string
func (*MatchErrorMatcherWithString) NumArgs ¶
func (m *MatchErrorMatcherWithString) NumArgs() int
func (*MatchErrorMatcherWithString) Type ¶
func (m *MatchErrorMatcherWithString) Type() Type
type Matcher ¶
type Matcher struct { Orig *ast.CallExpr Clone *ast.CallExpr // contains filtered or unexported fields }
func (*Matcher) GetMatcherInfo ¶
func (*Matcher) ReplaceMatcherArgs ¶
func (*Matcher) ReplaceMatcherFuncName ¶
func (*Matcher) ShouldReverseLogic ¶
type MultipleMatchersMatcher ¶
type MultipleMatchersMatcher struct {
// contains filtered or unexported fields
}
func (*MultipleMatchersMatcher) At ¶
func (m *MultipleMatchersMatcher) At(i int) *Matcher
func (*MultipleMatchersMatcher) Len ¶
func (m *MultipleMatchersMatcher) Len() int
func (*MultipleMatchersMatcher) MatcherName ¶
func (m *MultipleMatchersMatcher) MatcherName() string
func (*MultipleMatchersMatcher) Type ¶
func (m *MultipleMatchersMatcher) Type() Type
type SucceedMatcher ¶ added in v0.18.0
type SucceedMatcher struct{}
func (*SucceedMatcher) MatcherName ¶ added in v0.18.0
func (m *SucceedMatcher) MatcherName() string
func (*SucceedMatcher) Type ¶ added in v0.18.0
func (m *SucceedMatcher) Type() Type
type Type ¶
type Type uint64
const ( Unspecified Type = 1 << iota EqualMatcherType BeZeroMatcherType BeEmptyMatcherType BeTrueMatcherType BeFalseMatcherType BeNumericallyMatcherType HaveLenZeroMatcherType BeEquivalentToMatcherType BeIdenticalToMatcherType BeNilMatcherType MatchErrorMatcherType MultipleMatcherMatherType HaveValueMatherType WithTransformMatherType EqualBoolValueMatcherType EqualValueMatcherType HaveOccurredMatcherType SucceedMatcherType EqualNilMatcherType BoolValueFalse BoolValueTrue OrMatherType AndMatherType ErrMatchWithErr ErrMatchWithErrFunc ErrMatchWithString ErrMatchWithMatcher EqualZero GreaterThanZero )
type UnspecifiedMatcher ¶
type UnspecifiedMatcher struct {
// contains filtered or unexported fields
}
func (UnspecifiedMatcher) MatcherName ¶
func (u UnspecifiedMatcher) MatcherName() string
func (UnspecifiedMatcher) Type ¶
func (UnspecifiedMatcher) Type() Type
type WithTransformMatcher ¶
type WithTransformMatcher struct {
// contains filtered or unexported fields
}
func (*WithTransformMatcher) GetFuncType ¶
func (m *WithTransformMatcher) GetFuncType() gotypes.Type
func (*WithTransformMatcher) GetNested ¶
func (m *WithTransformMatcher) GetNested() *Matcher
func (*WithTransformMatcher) MatcherName ¶
func (m *WithTransformMatcher) MatcherName() string
func (*WithTransformMatcher) Type ¶
func (m *WithTransformMatcher) Type() Type
Click to show internal directories.
Click to hide internal directories.