func TestSimpleValues(t *testing.T) { r := ohyeah.RandomFunc(99) f := SimpleGen(r) for i := 0; i < 50; i++ { value := f() VerifyRoundTrip(t, value) } }
func TestLists(t *testing.T) { r := ohyeah.RandomFunc(99) sg := SimpleGen(r) g := ListGen(r, sg, 10) for i := 0; i < 40; i++ { value := g() VerifyRoundTrip(t, value) } }
func TestGeneratedMaps(t *testing.T) { r := ohyeah.RandomFunc(99) vg := SimpleGen(r) g := ohyeah.MapGen(r, KeywordGen(ohyeah.PatternedStringGen("key")), ohyeah.ArrayGen(r, vg, 10), 2000) for i := 0; i < 4; i++ { value := g() VerifyRoundTrip(t, value) } }
func TestSets(t *testing.T) { r := ohyeah.RandomFunc(99) symg := SymbolGen(ohyeah.PatternedStringGen("key")) sg := ohyeah.RepeatGen(SetGen(r, symg, 2000), 1) g := ohyeah.ArrayGen(r, sg, 100) for i := 0; i < 40; i++ { value := g() VerifyRoundTrip(t, value) } }