Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Codecs we want to test.
View Source
var DbInitalizer = []func(db.Codec) db.DB{ func(codec db.Codec) db.DB { return memdb.New(codec) }, func(codec db.Codec) db.DB { return leveldb.New(".leveldb", codec) }, func(codec db.Codec) db.DB { return badgerdb.New(".badgerdb", codec) }, }
DbInitalizer returns a list of initialize functions of different DB implementations.
Functions ¶
func CheckErrors ¶
CheckErrors takes a list of errors and check if any of them is not nil. It returns the first non-nil error or nil if all of the errors are nil.
func RandomNonDupStrings ¶
RandomNonDupStrings returns a list of non-duplicate strings.
func RandomTestStructGroups ¶
func RandomTestStructGroups(group, entriesPerGroup int) [][]TestStruct
RandomTestStructGroups creates a group of random TestStructs.
Types ¶
type TestStruct ¶
TestStruct is a struct which includes some commonly used types.
func RandomTestStruct ¶
func RandomTestStruct() TestStruct
RandomTestStruct returns a random `TestStruct`
Click to show internal directories.
Click to hide internal directories.