Documentation
¶
Index ¶
- func NewAnyOfOrderedMatcher[T constraints.Ordered](ss ...T) anyOfOrderedMatcher[T]
- func NewOrderedKeysMatcher[T any, Key constraints.Ordered](orderKeyGetter func(T) Key, want ...T) *orderedKeysMatcher[T, Key]
- func NewOrderedMatcher[T constraints.Ordered](want ...T) *orderedMatcher[T]
- type ArgsMigrations
- type CompMatcher
- type ErrMsgMatcherBase
- type FuncMatcher
- type IMatcher
- type ITestSuit
- type SameWantsTestSuit
- func NewSameWantsTestSuit[Args any, Migrations any, Wants any](argsMigrations []ArgsMigrations[Args, Migrations], wants Wants) *SameWantsTestSuit[Args, Migrations, Wants]
- func NewSameWantsTestSuitWithName[Args any, Migrations any, Wants any](name string, argsMigrations []ArgsMigrations[Args, Migrations], wants Wants) *SameWantsTestSuit[Args, Migrations, Wants]
- type TestCase
- type TestCases
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAnyOfOrderedMatcher ¶
func NewAnyOfOrderedMatcher[T constraints.Ordered](ss ...T) anyOfOrderedMatcher[T]
func NewOrderedKeysMatcher ¶
func NewOrderedKeysMatcher[T any, Key constraints.Ordered](orderKeyGetter func(T) Key, want ...T) *orderedKeysMatcher[T, Key]
func NewOrderedMatcher ¶
func NewOrderedMatcher[T constraints.Ordered](want ...T) *orderedMatcher[T]
Types ¶
type ArgsMigrations ¶
type CompMatcher ¶
type CompMatcher[Want any] struct { *ErrMsgMatcherBase // contains filtered or unexported fields }
func NewCompMatcher ¶
func NewCompMatcher[Want any](want Want) *CompMatcher[Want]
Compare gomock function arg by testify Ex:
var t *testing.T
mockCtl := gomock.NewController(t)
mockObj := NewMockIGoMockObj(mockCtl)
mockObj.EXPECT().Run(
test.NewCompMatcher(
&Want{},
),
)
func (*CompMatcher[Want]) String ¶
func (m *CompMatcher[Want]) String() string
type ErrMsgMatcherBase ¶
type ErrMsgMatcherBase struct {
// contains filtered or unexported fields
}
func NewErrMsgMatcherBase ¶
func NewErrMsgMatcherBase(matcher IMatcher) *ErrMsgMatcherBase
func (*ErrMsgMatcherBase) Got ¶
func (m *ErrMsgMatcherBase) Got(got any) string
Got is invoked with the received value. The result is used when printing the failure message.
func (*ErrMsgMatcherBase) Matches ¶
func (m *ErrMsgMatcherBase) Matches(x any) bool
type FuncMatcher ¶
type FuncMatcher[Got any] struct { *ErrMsgMatcherBase // contains filtered or unexported fields }
func NewFuncMatcher ¶
func NewFuncMatcher[Got any](checkFn func(got Got) (ok bool, msg string)) *FuncMatcher[Got]
func (*FuncMatcher[Got]) String ¶
func (m *FuncMatcher[Got]) String() string
type IMatcher ¶
type IMatcher interface {
// String describes what the matcher matches.
String() string
// contains filtered or unexported methods
}
type SameWantsTestSuit ¶
type SameWantsTestSuit[Args any, Migrations any, Wants any] struct { Name string ArgsMigrations []ArgsMigrations[Args, Migrations] Wants Wants }
func NewSameWantsTestSuit ¶
func NewSameWantsTestSuit[Args any, Migrations any, Wants any](argsMigrations []ArgsMigrations[Args, Migrations], wants Wants) *SameWantsTestSuit[Args, Migrations, Wants]
func NewSameWantsTestSuitWithName ¶
func NewSameWantsTestSuitWithName[Args any, Migrations any, Wants any](name string, argsMigrations []ArgsMigrations[Args, Migrations], wants Wants) *SameWantsTestSuit[Args, Migrations, Wants]
func (*SameWantsTestSuit[Args, Migrations, Wants]) MakeTestCases ¶
func (ts *SameWantsTestSuit[Args, Migrations, Wants]) MakeTestCases() []TestCase[Args, Migrations, Wants]
type TestCase ¶
type TestCase[Args any, Migrations any, Wants any] struct { Name string Args Args Migrations Migrations Wants Wants }
func NewTestCase ¶
func NewTestCaseWithName ¶
func (*TestCase[Args, Migrations, Wants]) MakeTestCases ¶
Click to show internal directories.
Click to hide internal directories.