(t *testing.T)
| 5243 | } |
| 5244 | } |
| 5245 | func TestNinRepStructJSON(t *testing.T) { |
| 5246 | seed := time.Now().UnixNano() |
| 5247 | popr := math_rand.New(math_rand.NewSource(seed)) |
| 5248 | p := NewPopulatedNinRepStruct(popr, true) |
| 5249 | marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} |
| 5250 | jsondata, err := marshaler.MarshalToString(p) |
| 5251 | if err != nil { |
| 5252 | t.Fatalf("seed = %d, err = %v", seed, err) |
| 5253 | } |
| 5254 | msg := &NinRepStruct{} |
| 5255 | err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) |
| 5256 | if err != nil { |
| 5257 | t.Fatalf("seed = %d, err = %v", seed, err) |
| 5258 | } |
| 5259 | if err := p.VerboseEqual(msg); err != nil { |
| 5260 | t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) |
| 5261 | } |
| 5262 | if !p.Equal(msg) { |
| 5263 | t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) |
| 5264 | } |
| 5265 | } |
| 5266 | func TestNidEmbeddedStructJSON(t *testing.T) { |
| 5267 | seed := time.Now().UnixNano() |
| 5268 | popr := math_rand.New(math_rand.NewSource(seed)) |
nothing calls this directly
no test coverage detected
searching dependent graphs…