1// Code generated by protoc-gen-gogo. DO NOT EDIT.
2// source: entity.proto
3
4package v2
5
6import testing "testing"
7import math_rand "math/rand"
8import time "time"
9import github_com_golang_protobuf_proto "github.com/golang/protobuf/proto"
10import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb"
11import proto "github.com/golang/protobuf/proto"
12import fmt "fmt"
13import math "math"
14import _ "github.com/gogo/protobuf/gogoproto"
15
16// Reference imports to suppress errors if they are not otherwise used.
17var _ = proto.Marshal
18var _ = fmt.Errorf
19var _ = math.Inf
20
21func TestEntityProto(t *testing.T) {
22	seed := time.Now().UnixNano()
23	popr := math_rand.New(math_rand.NewSource(seed))
24	p := NewPopulatedEntity(popr, false)
25	dAtA, err := github_com_golang_protobuf_proto.Marshal(p)
26	if err != nil {
27		t.Fatalf("seed = %d, err = %v", seed, err)
28	}
29	msg := &Entity{}
30	if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
31		t.Fatalf("seed = %d, err = %v", seed, err)
32	}
33	littlefuzz := make([]byte, len(dAtA))
34	copy(littlefuzz, dAtA)
35	for i := range dAtA {
36		dAtA[i] = byte(popr.Intn(256))
37	}
38	if !p.Equal(msg) {
39		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
40	}
41	if len(littlefuzz) > 0 {
42		fuzzamount := 100
43		for i := 0; i < fuzzamount; i++ {
44			littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
45			littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
46		}
47		// shouldn't panic
48		_ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg)
49	}
50}
51
52func TestEntityMarshalTo(t *testing.T) {
53	seed := time.Now().UnixNano()
54	popr := math_rand.New(math_rand.NewSource(seed))
55	p := NewPopulatedEntity(popr, false)
56	size := p.Size()
57	dAtA := make([]byte, size)
58	for i := range dAtA {
59		dAtA[i] = byte(popr.Intn(256))
60	}
61	_, err := p.MarshalTo(dAtA)
62	if err != nil {
63		t.Fatalf("seed = %d, err = %v", seed, err)
64	}
65	msg := &Entity{}
66	if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
67		t.Fatalf("seed = %d, err = %v", seed, err)
68	}
69	for i := range dAtA {
70		dAtA[i] = byte(popr.Intn(256))
71	}
72	if !p.Equal(msg) {
73		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
74	}
75}
76
77func TestSystemProto(t *testing.T) {
78	seed := time.Now().UnixNano()
79	popr := math_rand.New(math_rand.NewSource(seed))
80	p := NewPopulatedSystem(popr, false)
81	dAtA, err := github_com_golang_protobuf_proto.Marshal(p)
82	if err != nil {
83		t.Fatalf("seed = %d, err = %v", seed, err)
84	}
85	msg := &System{}
86	if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
87		t.Fatalf("seed = %d, err = %v", seed, err)
88	}
89	littlefuzz := make([]byte, len(dAtA))
90	copy(littlefuzz, dAtA)
91	for i := range dAtA {
92		dAtA[i] = byte(popr.Intn(256))
93	}
94	if !p.Equal(msg) {
95		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
96	}
97	if len(littlefuzz) > 0 {
98		fuzzamount := 100
99		for i := 0; i < fuzzamount; i++ {
100			littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
101			littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
102		}
103		// shouldn't panic
104		_ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg)
105	}
106}
107
108func TestSystemMarshalTo(t *testing.T) {
109	seed := time.Now().UnixNano()
110	popr := math_rand.New(math_rand.NewSource(seed))
111	p := NewPopulatedSystem(popr, false)
112	size := p.Size()
113	dAtA := make([]byte, size)
114	for i := range dAtA {
115		dAtA[i] = byte(popr.Intn(256))
116	}
117	_, err := p.MarshalTo(dAtA)
118	if err != nil {
119		t.Fatalf("seed = %d, err = %v", seed, err)
120	}
121	msg := &System{}
122	if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
123		t.Fatalf("seed = %d, err = %v", seed, err)
124	}
125	for i := range dAtA {
126		dAtA[i] = byte(popr.Intn(256))
127	}
128	if !p.Equal(msg) {
129		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
130	}
131}
132
133func TestNetworkProto(t *testing.T) {
134	seed := time.Now().UnixNano()
135	popr := math_rand.New(math_rand.NewSource(seed))
136	p := NewPopulatedNetwork(popr, false)
137	dAtA, err := github_com_golang_protobuf_proto.Marshal(p)
138	if err != nil {
139		t.Fatalf("seed = %d, err = %v", seed, err)
140	}
141	msg := &Network{}
142	if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
143		t.Fatalf("seed = %d, err = %v", seed, err)
144	}
145	littlefuzz := make([]byte, len(dAtA))
146	copy(littlefuzz, dAtA)
147	for i := range dAtA {
148		dAtA[i] = byte(popr.Intn(256))
149	}
150	if !p.Equal(msg) {
151		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
152	}
153	if len(littlefuzz) > 0 {
154		fuzzamount := 100
155		for i := 0; i < fuzzamount; i++ {
156			littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
157			littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
158		}
159		// shouldn't panic
160		_ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg)
161	}
162}
163
164func TestNetworkMarshalTo(t *testing.T) {
165	seed := time.Now().UnixNano()
166	popr := math_rand.New(math_rand.NewSource(seed))
167	p := NewPopulatedNetwork(popr, false)
168	size := p.Size()
169	dAtA := make([]byte, size)
170	for i := range dAtA {
171		dAtA[i] = byte(popr.Intn(256))
172	}
173	_, err := p.MarshalTo(dAtA)
174	if err != nil {
175		t.Fatalf("seed = %d, err = %v", seed, err)
176	}
177	msg := &Network{}
178	if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
179		t.Fatalf("seed = %d, err = %v", seed, err)
180	}
181	for i := range dAtA {
182		dAtA[i] = byte(popr.Intn(256))
183	}
184	if !p.Equal(msg) {
185		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
186	}
187}
188
189func TestNetworkInterfaceProto(t *testing.T) {
190	seed := time.Now().UnixNano()
191	popr := math_rand.New(math_rand.NewSource(seed))
192	p := NewPopulatedNetworkInterface(popr, false)
193	dAtA, err := github_com_golang_protobuf_proto.Marshal(p)
194	if err != nil {
195		t.Fatalf("seed = %d, err = %v", seed, err)
196	}
197	msg := &NetworkInterface{}
198	if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
199		t.Fatalf("seed = %d, err = %v", seed, err)
200	}
201	littlefuzz := make([]byte, len(dAtA))
202	copy(littlefuzz, dAtA)
203	for i := range dAtA {
204		dAtA[i] = byte(popr.Intn(256))
205	}
206	if !p.Equal(msg) {
207		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
208	}
209	if len(littlefuzz) > 0 {
210		fuzzamount := 100
211		for i := 0; i < fuzzamount; i++ {
212			littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
213			littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
214		}
215		// shouldn't panic
216		_ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg)
217	}
218}
219
220func TestNetworkInterfaceMarshalTo(t *testing.T) {
221	seed := time.Now().UnixNano()
222	popr := math_rand.New(math_rand.NewSource(seed))
223	p := NewPopulatedNetworkInterface(popr, false)
224	size := p.Size()
225	dAtA := make([]byte, size)
226	for i := range dAtA {
227		dAtA[i] = byte(popr.Intn(256))
228	}
229	_, err := p.MarshalTo(dAtA)
230	if err != nil {
231		t.Fatalf("seed = %d, err = %v", seed, err)
232	}
233	msg := &NetworkInterface{}
234	if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
235		t.Fatalf("seed = %d, err = %v", seed, err)
236	}
237	for i := range dAtA {
238		dAtA[i] = byte(popr.Intn(256))
239	}
240	if !p.Equal(msg) {
241		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
242	}
243}
244
245func TestDeregistrationProto(t *testing.T) {
246	seed := time.Now().UnixNano()
247	popr := math_rand.New(math_rand.NewSource(seed))
248	p := NewPopulatedDeregistration(popr, false)
249	dAtA, err := github_com_golang_protobuf_proto.Marshal(p)
250	if err != nil {
251		t.Fatalf("seed = %d, err = %v", seed, err)
252	}
253	msg := &Deregistration{}
254	if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
255		t.Fatalf("seed = %d, err = %v", seed, err)
256	}
257	littlefuzz := make([]byte, len(dAtA))
258	copy(littlefuzz, dAtA)
259	for i := range dAtA {
260		dAtA[i] = byte(popr.Intn(256))
261	}
262	if !p.Equal(msg) {
263		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
264	}
265	if len(littlefuzz) > 0 {
266		fuzzamount := 100
267		for i := 0; i < fuzzamount; i++ {
268			littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
269			littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
270		}
271		// shouldn't panic
272		_ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg)
273	}
274}
275
276func TestDeregistrationMarshalTo(t *testing.T) {
277	seed := time.Now().UnixNano()
278	popr := math_rand.New(math_rand.NewSource(seed))
279	p := NewPopulatedDeregistration(popr, false)
280	size := p.Size()
281	dAtA := make([]byte, size)
282	for i := range dAtA {
283		dAtA[i] = byte(popr.Intn(256))
284	}
285	_, err := p.MarshalTo(dAtA)
286	if err != nil {
287		t.Fatalf("seed = %d, err = %v", seed, err)
288	}
289	msg := &Deregistration{}
290	if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
291		t.Fatalf("seed = %d, err = %v", seed, err)
292	}
293	for i := range dAtA {
294		dAtA[i] = byte(popr.Intn(256))
295	}
296	if !p.Equal(msg) {
297		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
298	}
299}
300
301func TestEntityJSON(t *testing.T) {
302	seed := time.Now().UnixNano()
303	popr := math_rand.New(math_rand.NewSource(seed))
304	p := NewPopulatedEntity(popr, true)
305	marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
306	jsondata, err := marshaler.MarshalToString(p)
307	if err != nil {
308		t.Fatalf("seed = %d, err = %v", seed, err)
309	}
310	msg := &Entity{}
311	err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
312	if err != nil {
313		t.Fatalf("seed = %d, err = %v", seed, err)
314	}
315	if !p.Equal(msg) {
316		t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
317	}
318}
319func TestSystemJSON(t *testing.T) {
320	seed := time.Now().UnixNano()
321	popr := math_rand.New(math_rand.NewSource(seed))
322	p := NewPopulatedSystem(popr, true)
323	marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
324	jsondata, err := marshaler.MarshalToString(p)
325	if err != nil {
326		t.Fatalf("seed = %d, err = %v", seed, err)
327	}
328	msg := &System{}
329	err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
330	if err != nil {
331		t.Fatalf("seed = %d, err = %v", seed, err)
332	}
333	if !p.Equal(msg) {
334		t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
335	}
336}
337func TestNetworkJSON(t *testing.T) {
338	seed := time.Now().UnixNano()
339	popr := math_rand.New(math_rand.NewSource(seed))
340	p := NewPopulatedNetwork(popr, true)
341	marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
342	jsondata, err := marshaler.MarshalToString(p)
343	if err != nil {
344		t.Fatalf("seed = %d, err = %v", seed, err)
345	}
346	msg := &Network{}
347	err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
348	if err != nil {
349		t.Fatalf("seed = %d, err = %v", seed, err)
350	}
351	if !p.Equal(msg) {
352		t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
353	}
354}
355func TestNetworkInterfaceJSON(t *testing.T) {
356	seed := time.Now().UnixNano()
357	popr := math_rand.New(math_rand.NewSource(seed))
358	p := NewPopulatedNetworkInterface(popr, true)
359	marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
360	jsondata, err := marshaler.MarshalToString(p)
361	if err != nil {
362		t.Fatalf("seed = %d, err = %v", seed, err)
363	}
364	msg := &NetworkInterface{}
365	err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
366	if err != nil {
367		t.Fatalf("seed = %d, err = %v", seed, err)
368	}
369	if !p.Equal(msg) {
370		t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
371	}
372}
373func TestDeregistrationJSON(t *testing.T) {
374	seed := time.Now().UnixNano()
375	popr := math_rand.New(math_rand.NewSource(seed))
376	p := NewPopulatedDeregistration(popr, true)
377	marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
378	jsondata, err := marshaler.MarshalToString(p)
379	if err != nil {
380		t.Fatalf("seed = %d, err = %v", seed, err)
381	}
382	msg := &Deregistration{}
383	err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
384	if err != nil {
385		t.Fatalf("seed = %d, err = %v", seed, err)
386	}
387	if !p.Equal(msg) {
388		t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
389	}
390}
391func TestEntityProtoText(t *testing.T) {
392	seed := time.Now().UnixNano()
393	popr := math_rand.New(math_rand.NewSource(seed))
394	p := NewPopulatedEntity(popr, true)
395	dAtA := github_com_golang_protobuf_proto.MarshalTextString(p)
396	msg := &Entity{}
397	if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
398		t.Fatalf("seed = %d, err = %v", seed, err)
399	}
400	if !p.Equal(msg) {
401		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
402	}
403}
404
405func TestEntityProtoCompactText(t *testing.T) {
406	seed := time.Now().UnixNano()
407	popr := math_rand.New(math_rand.NewSource(seed))
408	p := NewPopulatedEntity(popr, true)
409	dAtA := github_com_golang_protobuf_proto.CompactTextString(p)
410	msg := &Entity{}
411	if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
412		t.Fatalf("seed = %d, err = %v", seed, err)
413	}
414	if !p.Equal(msg) {
415		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
416	}
417}
418
419func TestSystemProtoText(t *testing.T) {
420	seed := time.Now().UnixNano()
421	popr := math_rand.New(math_rand.NewSource(seed))
422	p := NewPopulatedSystem(popr, true)
423	dAtA := github_com_golang_protobuf_proto.MarshalTextString(p)
424	msg := &System{}
425	if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
426		t.Fatalf("seed = %d, err = %v", seed, err)
427	}
428	if !p.Equal(msg) {
429		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
430	}
431}
432
433func TestSystemProtoCompactText(t *testing.T) {
434	seed := time.Now().UnixNano()
435	popr := math_rand.New(math_rand.NewSource(seed))
436	p := NewPopulatedSystem(popr, true)
437	dAtA := github_com_golang_protobuf_proto.CompactTextString(p)
438	msg := &System{}
439	if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
440		t.Fatalf("seed = %d, err = %v", seed, err)
441	}
442	if !p.Equal(msg) {
443		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
444	}
445}
446
447func TestNetworkProtoText(t *testing.T) {
448	seed := time.Now().UnixNano()
449	popr := math_rand.New(math_rand.NewSource(seed))
450	p := NewPopulatedNetwork(popr, true)
451	dAtA := github_com_golang_protobuf_proto.MarshalTextString(p)
452	msg := &Network{}
453	if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
454		t.Fatalf("seed = %d, err = %v", seed, err)
455	}
456	if !p.Equal(msg) {
457		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
458	}
459}
460
461func TestNetworkProtoCompactText(t *testing.T) {
462	seed := time.Now().UnixNano()
463	popr := math_rand.New(math_rand.NewSource(seed))
464	p := NewPopulatedNetwork(popr, true)
465	dAtA := github_com_golang_protobuf_proto.CompactTextString(p)
466	msg := &Network{}
467	if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
468		t.Fatalf("seed = %d, err = %v", seed, err)
469	}
470	if !p.Equal(msg) {
471		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
472	}
473}
474
475func TestNetworkInterfaceProtoText(t *testing.T) {
476	seed := time.Now().UnixNano()
477	popr := math_rand.New(math_rand.NewSource(seed))
478	p := NewPopulatedNetworkInterface(popr, true)
479	dAtA := github_com_golang_protobuf_proto.MarshalTextString(p)
480	msg := &NetworkInterface{}
481	if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
482		t.Fatalf("seed = %d, err = %v", seed, err)
483	}
484	if !p.Equal(msg) {
485		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
486	}
487}
488
489func TestNetworkInterfaceProtoCompactText(t *testing.T) {
490	seed := time.Now().UnixNano()
491	popr := math_rand.New(math_rand.NewSource(seed))
492	p := NewPopulatedNetworkInterface(popr, true)
493	dAtA := github_com_golang_protobuf_proto.CompactTextString(p)
494	msg := &NetworkInterface{}
495	if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
496		t.Fatalf("seed = %d, err = %v", seed, err)
497	}
498	if !p.Equal(msg) {
499		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
500	}
501}
502
503func TestDeregistrationProtoText(t *testing.T) {
504	seed := time.Now().UnixNano()
505	popr := math_rand.New(math_rand.NewSource(seed))
506	p := NewPopulatedDeregistration(popr, true)
507	dAtA := github_com_golang_protobuf_proto.MarshalTextString(p)
508	msg := &Deregistration{}
509	if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
510		t.Fatalf("seed = %d, err = %v", seed, err)
511	}
512	if !p.Equal(msg) {
513		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
514	}
515}
516
517func TestDeregistrationProtoCompactText(t *testing.T) {
518	seed := time.Now().UnixNano()
519	popr := math_rand.New(math_rand.NewSource(seed))
520	p := NewPopulatedDeregistration(popr, true)
521	dAtA := github_com_golang_protobuf_proto.CompactTextString(p)
522	msg := &Deregistration{}
523	if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
524		t.Fatalf("seed = %d, err = %v", seed, err)
525	}
526	if !p.Equal(msg) {
527		t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
528	}
529}
530
531func TestEntityFace(t *testing.T) {
532	popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
533	p := NewPopulatedEntity(popr, true)
534	msg := p.TestProto()
535	if !p.Equal(msg) {
536		t.Fatalf("%#v !Face Equal %#v", msg, p)
537	}
538}
539func TestEntitySize(t *testing.T) {
540	seed := time.Now().UnixNano()
541	popr := math_rand.New(math_rand.NewSource(seed))
542	p := NewPopulatedEntity(popr, true)
543	size2 := github_com_golang_protobuf_proto.Size(p)
544	dAtA, err := github_com_golang_protobuf_proto.Marshal(p)
545	if err != nil {
546		t.Fatalf("seed = %d, err = %v", seed, err)
547	}
548	size := p.Size()
549	if len(dAtA) != size {
550		t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA))
551	}
552	if size2 != size {
553		t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
554	}
555	size3 := github_com_golang_protobuf_proto.Size(p)
556	if size3 != size {
557		t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
558	}
559}
560
561func TestSystemSize(t *testing.T) {
562	seed := time.Now().UnixNano()
563	popr := math_rand.New(math_rand.NewSource(seed))
564	p := NewPopulatedSystem(popr, true)
565	size2 := github_com_golang_protobuf_proto.Size(p)
566	dAtA, err := github_com_golang_protobuf_proto.Marshal(p)
567	if err != nil {
568		t.Fatalf("seed = %d, err = %v", seed, err)
569	}
570	size := p.Size()
571	if len(dAtA) != size {
572		t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA))
573	}
574	if size2 != size {
575		t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
576	}
577	size3 := github_com_golang_protobuf_proto.Size(p)
578	if size3 != size {
579		t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
580	}
581}
582
583func TestNetworkSize(t *testing.T) {
584	seed := time.Now().UnixNano()
585	popr := math_rand.New(math_rand.NewSource(seed))
586	p := NewPopulatedNetwork(popr, true)
587	size2 := github_com_golang_protobuf_proto.Size(p)
588	dAtA, err := github_com_golang_protobuf_proto.Marshal(p)
589	if err != nil {
590		t.Fatalf("seed = %d, err = %v", seed, err)
591	}
592	size := p.Size()
593	if len(dAtA) != size {
594		t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA))
595	}
596	if size2 != size {
597		t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
598	}
599	size3 := github_com_golang_protobuf_proto.Size(p)
600	if size3 != size {
601		t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
602	}
603}
604
605func TestNetworkInterfaceSize(t *testing.T) {
606	seed := time.Now().UnixNano()
607	popr := math_rand.New(math_rand.NewSource(seed))
608	p := NewPopulatedNetworkInterface(popr, true)
609	size2 := github_com_golang_protobuf_proto.Size(p)
610	dAtA, err := github_com_golang_protobuf_proto.Marshal(p)
611	if err != nil {
612		t.Fatalf("seed = %d, err = %v", seed, err)
613	}
614	size := p.Size()
615	if len(dAtA) != size {
616		t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA))
617	}
618	if size2 != size {
619		t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
620	}
621	size3 := github_com_golang_protobuf_proto.Size(p)
622	if size3 != size {
623		t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
624	}
625}
626
627func TestDeregistrationSize(t *testing.T) {
628	seed := time.Now().UnixNano()
629	popr := math_rand.New(math_rand.NewSource(seed))
630	p := NewPopulatedDeregistration(popr, true)
631	size2 := github_com_golang_protobuf_proto.Size(p)
632	dAtA, err := github_com_golang_protobuf_proto.Marshal(p)
633	if err != nil {
634		t.Fatalf("seed = %d, err = %v", seed, err)
635	}
636	size := p.Size()
637	if len(dAtA) != size {
638		t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA))
639	}
640	if size2 != size {
641		t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
642	}
643	size3 := github_com_golang_protobuf_proto.Size(p)
644	if size3 != size {
645		t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
646	}
647}
648
649//These tests are generated by github.com/gogo/protobuf/plugin/testgen
650