MCPcopy
hub / github.com/tinylib/msgp / randomExt

Function randomExt

msgp/extension_test.go:11–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9var extSizes = [...]int{0, 1, 2, 4, 8, 16, int(tint8), int(tuint16), int(tuint32)}
10
11func randomExt() RawExtension {
12 e := RawExtension{}
13 e.Type = int8(rand.Int())
14 e.Data = RandBytes(extSizes[rand.Intn(len(extSizes))])
15 return e
16}
17
18func TestReadWriteExtension(t *testing.T) {
19 var buf bytes.Buffer

Callers 4

TestReadWriteExtensionFunction · 0.85

Calls 2

RandBytesFunction · 0.85
IntMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…