(t *testing.T)
| 5117 | } |
| 5118 | } |
| 5119 | func TestNinRepNativeJSON(t *testing.T) { |
| 5120 | seed := time.Now().UnixNano() |
| 5121 | popr := math_rand.New(math_rand.NewSource(seed)) |
| 5122 | p := NewPopulatedNinRepNative(popr, true) |
| 5123 | marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} |
| 5124 | jsondata, err := marshaler.MarshalToString(p) |
| 5125 | if err != nil { |
| 5126 | t.Fatalf("seed = %d, err = %v", seed, err) |
| 5127 | } |
| 5128 | msg := &NinRepNative{} |
| 5129 | err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) |
| 5130 | if err != nil { |
| 5131 | t.Fatalf("seed = %d, err = %v", seed, err) |
| 5132 | } |
| 5133 | if err := p.VerboseEqual(msg); err != nil { |
| 5134 | t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) |
| 5135 | } |
| 5136 | if !p.Equal(msg) { |
| 5137 | t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) |
| 5138 | } |
| 5139 | } |
| 5140 | func TestNidRepPackedNativeJSON(t *testing.T) { |
| 5141 | seed := time.Now().UnixNano() |
| 5142 | popr := math_rand.New(math_rand.NewSource(seed)) |
nothing calls this directly
no test coverage detected
searching dependent graphs…