Documentation ¶
Overview ¶
Package assert is a generated GoMock package.
Index ¶
- func Check(cases Cases) error
- func Equal(t T, got interface{}, expect interface{}, msg ...string)
- func Error(t T, got error, expr string, msg ...string)
- func False(t T, got bool, msg ...string)
- func Implements(t T, got interface{}, expect interface{}, msg ...string)
- func IsNil(v reflect.Value) bool
- func JsonEqual(t T, got string, expect string, msg ...string)
- func Matches(t T, got string, expr string, msg ...string)
- func Nil(t T, got interface{}, msg ...string)
- func NotEqual(t T, got interface{}, expect interface{}, msg ...string)
- func NotNil(t T, got interface{}, msg ...string)
- func NotSame(t T, got interface{}, expect interface{}, msg ...string)
- func Panic(t T, fn func(), expr string, msg ...string)
- func Same(t T, got interface{}, expect interface{}, msg ...string)
- func True(t T, got bool, msg ...string)
- func TypeOf(t T, got interface{}, expect interface{}, msg ...string)
- type Assertion
- func (a *Assertion) HasPrefix(prefix string, msg ...string) *Assertion
- func (a *Assertion) IsEqualTo(expect interface{}, msg ...string) *Assertion
- func (a *Assertion) IsFalse(msg ...string) *Assertion
- func (a *Assertion) IsNil(msg ...string) *Assertion
- func (a *Assertion) IsNotEqualTo(expect interface{}, msg ...string) *Assertion
- func (a *Assertion) IsNotNil(msg ...string) *Assertion
- func (a *Assertion) IsNotSame(expect interface{}, msg ...string) *Assertion
- func (a *Assertion) IsSame(expect interface{}, msg ...string) *Assertion
- func (a *Assertion) IsTrue(msg ...string) *Assertion
- type BoolAssertion
- type Cases
- type MockT
- type MockTMockRecorder
- type StringAssertion
- func (a *StringAssertion) HasPrefix(prefix string, msg ...string) *StringAssertion
- func (a *StringAssertion) HasSubString(substr string, msg ...string) *StringAssertion
- func (a *StringAssertion) HasSuffix(suffix string, msg ...string) *StringAssertion
- func (a *StringAssertion) IsEqualFold(s string, msg ...string) *StringAssertion
- type T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Implements ¶
Implements asserts that got implements expect.
func Panic ¶
Panic asserts that function fn() would panic. It fails if the panic message does not match the regular expression.
Types ¶
type Assertion ¶
type Assertion struct {
// contains filtered or unexported fields
}
func (*Assertion) IsNotEqualTo ¶
type BoolAssertion ¶
type BoolAssertion struct {
// contains filtered or unexported fields
}
func ThatBool ¶
func ThatBool(t T, v bool) *BoolAssertion
func (*BoolAssertion) IsFalse ¶
func (a *BoolAssertion) IsFalse(msg ...string) *BoolAssertion
func (*BoolAssertion) IsTrue ¶
func (a *BoolAssertion) IsTrue(msg ...string) *BoolAssertion
type MockT ¶
type MockT struct {
// contains filtered or unexported fields
}
MockT is a mock of T interface.
func (*MockT) EXPECT ¶
func (m *MockT) EXPECT() *MockTMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockTMockRecorder ¶
type MockTMockRecorder struct {
// contains filtered or unexported fields
}
MockTMockRecorder is the mock recorder for MockT.
func (*MockTMockRecorder) Fail ¶
func (mr *MockTMockRecorder) Fail() *gomock.Call
Fail indicates an expected call of Fail.
func (*MockTMockRecorder) Helper ¶
func (mr *MockTMockRecorder) Helper() *gomock.Call
Helper indicates an expected call of Helper.
func (*MockTMockRecorder) Log ¶
func (mr *MockTMockRecorder) Log(args ...interface{}) *gomock.Call
Log indicates an expected call of Log.
type StringAssertion ¶
type StringAssertion struct {
// contains filtered or unexported fields
}
func ThatString ¶
func ThatString(t T, v string) *StringAssertion
func (*StringAssertion) HasPrefix ¶
func (a *StringAssertion) HasPrefix(prefix string, msg ...string) *StringAssertion
func (*StringAssertion) HasSubString ¶
func (a *StringAssertion) HasSubString(substr string, msg ...string) *StringAssertion
func (*StringAssertion) HasSuffix ¶
func (a *StringAssertion) HasSuffix(suffix string, msg ...string) *StringAssertion
func (*StringAssertion) IsEqualFold ¶
func (a *StringAssertion) IsEqualFold(s string, msg ...string) *StringAssertion
Click to show internal directories.
Click to hide internal directories.