(t *testing.T)
| 5201 | } |
| 5202 | } |
| 5203 | func TestNinOptStructJSON(t *testing.T) { |
| 5204 | seed := time.Now().UnixNano() |
| 5205 | popr := math_rand.New(math_rand.NewSource(seed)) |
| 5206 | p := NewPopulatedNinOptStruct(popr, true) |
| 5207 | marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} |
| 5208 | jsondata, err := marshaler.MarshalToString(p) |
| 5209 | if err != nil { |
| 5210 | t.Fatalf("seed = %d, err = %v", seed, err) |
| 5211 | } |
| 5212 | msg := &NinOptStruct{} |
| 5213 | err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) |
| 5214 | if err != nil { |
| 5215 | t.Fatalf("seed = %d, err = %v", seed, err) |
| 5216 | } |
| 5217 | if err := p.VerboseEqual(msg); err != nil { |
| 5218 | t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) |
| 5219 | } |
| 5220 | if !p.Equal(msg) { |
| 5221 | t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) |
| 5222 | } |
| 5223 | } |
| 5224 | func TestNidRepStructJSON(t *testing.T) { |
| 5225 | seed := time.Now().UnixNano() |
| 5226 | popr := math_rand.New(math_rand.NewSource(seed)) |
nothing calls this directly
no test coverage detected
searching dependent graphs…