MCPcopy Create free account
hub / github.com/brimdata/super / GenValues

Function GenValues

fuzz/fuzz.go:158–168  ·  view source on GitHub ↗
(b *bytes.Reader, context *super.Context, types []super.Type)

Source from the content-addressed store, hash-verified

156}
157
158func GenValues(b *bytes.Reader, context *super.Context, types []super.Type) []super.Value {
159 var values []super.Value
160 var builder scode.Builder
161 for GenByte(b) != 0 {
162 typ := types[int(GenByte(b))%len(types)]
163 builder.Reset()
164 GenValue(b, context, typ, &builder)
165 values = append(values, super.NewValue(typ, builder.Bytes().Body()))
166 }
167 return values
168}
169
170func GenValue(b *bytes.Reader, context *super.Context, typ super.Type, builder *scode.Builder) {
171 if GenByte(b) == 0 {

Callers 2

FuzzQueryFunction · 0.92
FuzzCSUPRoundtripGenFunction · 0.92

Calls 6

ResetMethod · 0.95
BytesMethod · 0.95
NewValueFunction · 0.92
GenByteFunction · 0.85
GenValueFunction · 0.85
BodyMethod · 0.80

Tested by 2

FuzzQueryFunction · 0.74
FuzzCSUPRoundtripGenFunction · 0.74