(t *testing.T)
| 260 | } |
| 261 | |
| 262 | func TestNidRepNativeMarshalTo(t *testing.T) { |
| 263 | seed := time.Now().UnixNano() |
| 264 | popr := math_rand.New(math_rand.NewSource(seed)) |
| 265 | p := NewPopulatedNidRepNative(popr, false) |
| 266 | size := p.Size() |
| 267 | dAtA := make([]byte, size) |
| 268 | for i := range dAtA { |
| 269 | dAtA[i] = byte(popr.Intn(256)) |
| 270 | } |
| 271 | _, err := p.MarshalTo(dAtA) |
| 272 | if err != nil { |
| 273 | t.Fatalf("seed = %d, err = %v", seed, err) |
| 274 | } |
| 275 | msg := &NidRepNative{} |
| 276 | if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { |
| 277 | t.Fatalf("seed = %d, err = %v", seed, err) |
| 278 | } |
| 279 | for i := range dAtA { |
| 280 | dAtA[i] = byte(popr.Intn(256)) |
| 281 | } |
| 282 | if err := p.VerboseEqual(msg); err != nil { |
| 283 | t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) |
| 284 | } |
| 285 | if !p.Equal(msg) { |
| 286 | t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) |
| 287 | } |
| 288 | } |
| 289 | |
| 290 | func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { |
| 291 | popr := math_rand.New(math_rand.NewSource(616)) |
nothing calls this directly
no test coverage detected
searching dependent graphs…