Documentation
¶
Index ¶
- func AssertFloat32Field(t *testing.T, data Data, field string, expected float32)
- func AssertIntField(t *testing.T, data Data, field string, expected int)
- func AssertStringField(t *testing.T, data Data, field string, expected string)
- func InitDumb()
- func InitDumbWithSeed(seed uint64)
- type Context
- type Data
- type Generator
- type ObjGenerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertFloat32Field ¶
func AssertStringField ¶
func InitDumbWithSeed ¶
func InitDumbWithSeed(seed uint64)
Types ¶
type Context ¶
type Context struct {
}
Context holds the context information, like current depth or settings for the process
type Generator ¶
Generator is function that fills provided Data map with generated values
func Compose ¶
Compose is a helper function that composes 2 generators. If one is nil, returns other without changes. if both are not nil - creates a wrapper function that calls first generator and then calls second one
func GenerateString ¶
GenerateString generates a random word
type ObjGenerator ¶
type ObjGenerator func() Data
ObjGenerator is a generator for object
func NewObjGenerator ¶
func NewObjGenerator(g Generator) ObjGenerator
NewObjGenerator returns an ObjGenerator function. This function creates instance of Data and Context Then calls generator provided as argument and returns Data filled with generated values.