Documentation ¶
Index ¶
- Variables
- func AppendIfNotEmpty(slice []string, val string) []string
- func GetErrorMsgIfDifferent(expected, received, errMsg string) string
- func GetTableCaseNameFromCaseName(caseName string) string
- func GetTableFromName(t testInterface, testCaseName string) *typedef.Table
- type ExpectedEntry
- type ExpectedStore
- type FuncOptions
- type MockGenerator
- type NonRandSource
- type TestCaseOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var (
UpdateExpectedFlag = flag.Bool("update-expected", false, "make test to update expected results")
)
Functions ¶
func AppendIfNotEmpty ¶
func GetErrorMsgIfDifferent ¶
func GetTableFromName ¶
Types ¶
type ExpectedEntry ¶
type ExpectedStore ¶
type ExpectedStore[T ExpectedEntry[T]] struct { // contains filtered or unexported fields }
func LoadExpectedFromFile ¶
func LoadExpectedFromFile[T ExpectedEntry[T]](t *testing.T, filePath string, cases []string, updateExpected bool) *ExpectedStore[T]
func (*ExpectedStore[T]) CompareOrStore ¶
func (f *ExpectedStore[T]) CompareOrStore(t *testing.T, caseName string, received T)
func (*ExpectedStore[T]) UpdateExpected ¶
func (f *ExpectedStore[T]) UpdateExpected(t *testing.T)
type FuncOptions ¶
type MockGenerator ¶
type MockGenerator struct {
// contains filtered or unexported fields
}
func GetAllForTestStmt ¶
func NewTestGenerator ¶
func NewTestGenerator( table *typedef.Table, rnd *rand.Rand, partitionsConfig *typedef.PartitionRangeConfig, routingKeyCreator *routingkey.Creator, ) *MockGenerator
func (*MockGenerator) Get ¶
func (g *MockGenerator) Get() *typedef.ValueWithToken
func (*MockGenerator) GetOld ¶
func (g *MockGenerator) GetOld() *typedef.ValueWithToken
func (*MockGenerator) GiveOld ¶
func (g *MockGenerator) GiveOld(_ *typedef.ValueWithToken)
func (*MockGenerator) GiveOlds ¶ added in v1.8.7
func (g *MockGenerator) GiveOlds(_ []*typedef.ValueWithToken)
func (*MockGenerator) ReleaseToken ¶
func (g *MockGenerator) ReleaseToken(_ uint64)
type NonRandSource ¶
type NonRandSource uint64
func (NonRandSource) Seed ¶
func (s NonRandSource) Seed(uint64)
func (NonRandSource) Uint64 ¶
func (s NonRandSource) Uint64() uint64
type TestCaseOptions ¶
type TestCaseOptions []string
func GetOptionsFromCaseName ¶
func GetOptionsFromCaseName(caseName string) TestCaseOptions
func SplitCaseName ¶
func SplitCaseName(caseName string) (string, TestCaseOptions)
func (TestCaseOptions) GetBool ¶
func (o TestCaseOptions) GetBool(name string) bool
func (TestCaseOptions) GetString ¶
func (o TestCaseOptions) GetString(name string) string
func (TestCaseOptions) HandleOption ¶
func (o TestCaseOptions) HandleOption(name string, handler func(option string))
Click to show internal directories.
Click to hide internal directories.