MCPcopy
hub / github.com/gogo/protobuf / NewPopulatedNinRepStruct

Function NewPopulatedNinRepStruct

test/combos/both/thetest.pb.go:27473–27562  ·  view source on GitHub ↗
(r randyThetest, easy bool)

Source from the content-addressed store, hash-verified

27471}
27472
27473func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct {
27474 this := &NinRepStruct{}
27475 if r.Intn(5) != 0 {
27476 v100 := r.Intn(10)
27477 this.Field1 = make([]float64, v100)
27478 for i := 0; i < v100; i++ {
27479 this.Field1[i] = float64(r.Float64())
27480 if r.Intn(2) == 0 {
27481 this.Field1[i] *= -1
27482 }
27483 }
27484 }
27485 if r.Intn(5) != 0 {
27486 v101 := r.Intn(10)
27487 this.Field2 = make([]float32, v101)
27488 for i := 0; i < v101; i++ {
27489 this.Field2[i] = float32(r.Float32())
27490 if r.Intn(2) == 0 {
27491 this.Field2[i] *= -1
27492 }
27493 }
27494 }
27495 if r.Intn(5) != 0 {
27496 v102 := r.Intn(5)
27497 this.Field3 = make([]*NidOptNative, v102)
27498 for i := 0; i < v102; i++ {
27499 this.Field3[i] = NewPopulatedNidOptNative(r, easy)
27500 }
27501 }
27502 if r.Intn(5) != 0 {
27503 v103 := r.Intn(5)
27504 this.Field4 = make([]*NinOptNative, v103)
27505 for i := 0; i < v103; i++ {
27506 this.Field4[i] = NewPopulatedNinOptNative(r, easy)
27507 }
27508 }
27509 if r.Intn(5) != 0 {
27510 v104 := r.Intn(10)
27511 this.Field6 = make([]uint64, v104)
27512 for i := 0; i < v104; i++ {
27513 this.Field6[i] = uint64(uint64(r.Uint32()))
27514 }
27515 }
27516 if r.Intn(5) != 0 {
27517 v105 := r.Intn(10)
27518 this.Field7 = make([]int32, v105)
27519 for i := 0; i < v105; i++ {
27520 this.Field7[i] = int32(r.Int31())
27521 if r.Intn(2) == 0 {
27522 this.Field7[i] *= -1
27523 }
27524 }
27525 }
27526 if r.Intn(5) != 0 {
27527 v106 := r.Intn(5)
27528 this.Field8 = make([]*NidOptNative, v106)
27529 for i := 0; i < v106; i++ {
27530 this.Field8[i] = NewPopulatedNidOptNative(r, easy)

Calls 9

NewPopulatedNidOptNativeFunction · 0.70
NewPopulatedNinOptNativeFunction · 0.70
randStringThetestFunction · 0.70
randUnrecognizedThetestFunction · 0.70
IntnMethod · 0.65
Float64Method · 0.65
Float32Method · 0.65
Uint32Method · 0.65
Int31Method · 0.65

Tested by 14

TestNinRepStructProtoFunction · 0.56
TestNinRepStructJSONFunction · 0.56
TestNinRepStructCompareFunction · 0.56
TestNinRepStructFaceFunction · 0.56
TestNinRepStructGoStringFunction · 0.56
TestNinRepStructSizeFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…