(t *testing.T)
| 5222 | } |
| 5223 | } |
| 5224 | func TestNidRepStructJSON(t *testing.T) { |
| 5225 | seed := time.Now().UnixNano() |
| 5226 | popr := math_rand.New(math_rand.NewSource(seed)) |
| 5227 | p := NewPopulatedNidRepStruct(popr, true) |
| 5228 | marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} |
| 5229 | jsondata, err := marshaler.MarshalToString(p) |
| 5230 | if err != nil { |
| 5231 | t.Fatalf("seed = %d, err = %v", seed, err) |
| 5232 | } |
| 5233 | msg := &NidRepStruct{} |
| 5234 | err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) |
| 5235 | if err != nil { |
| 5236 | t.Fatalf("seed = %d, err = %v", seed, err) |
| 5237 | } |
| 5238 | if err := p.VerboseEqual(msg); err != nil { |
| 5239 | t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) |
| 5240 | } |
| 5241 | if !p.Equal(msg) { |
| 5242 | t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) |
| 5243 | } |
| 5244 | } |
| 5245 | func TestNinRepStructJSON(t *testing.T) { |
| 5246 | seed := time.Now().UnixNano() |
| 5247 | popr := math_rand.New(math_rand.NewSource(seed)) |
nothing calls this directly
no test coverage detected
searching dependent graphs…