(t *testing.T)
| 1209 | } |
| 1210 | |
| 1211 | func TestPackedNonPackedDecoderSwitching(t *testing.T) { |
| 1212 | np, p := new(NonPackedTest), new(PackedTest) |
| 1213 | |
| 1214 | // non-packed -> packed |
| 1215 | np.A = []int32{0, 1, 1, 2, 3, 5} |
| 1216 | encodeDecode(t, np, p, "non-packed -> packed") |
| 1217 | if !reflect.DeepEqual(np.A, p.B) { |
| 1218 | t.Errorf("failed non-packed -> packed; np.A=%+v, p.B=%+v", np.A, p.B) |
| 1219 | } |
| 1220 | |
| 1221 | // packed -> non-packed |
| 1222 | np.Reset() |
| 1223 | p.B = []int32{3, 1, 4, 1, 5, 9} |
| 1224 | encodeDecode(t, p, np, "packed -> non-packed") |
| 1225 | if !reflect.DeepEqual(p.B, np.A) { |
| 1226 | t.Errorf("failed packed -> non-packed; p.B=%+v, np.A=%+v", p.B, np.A) |
| 1227 | } |
| 1228 | } |
| 1229 | |
| 1230 | func TestProto1RepeatedGroup(t *testing.T) { |
| 1231 | pb := &MessageList{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…