Bumping k8s dependencies to 1.13
This commit is contained in:
18
vendor/github.com/gogo/protobuf/proto/proto3_test.go
generated
vendored
18
vendor/github.com/gogo/protobuf/proto/proto3_test.go
generated
vendored
@@ -32,11 +32,12 @@
|
||||
package proto_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
"github.com/gogo/protobuf/proto"
|
||||
pb "github.com/gogo/protobuf/proto/proto3_proto"
|
||||
tpb "github.com/gogo/protobuf/proto/testdata"
|
||||
tpb "github.com/gogo/protobuf/proto/test_proto"
|
||||
)
|
||||
|
||||
func TestProto3ZeroValues(t *testing.T) {
|
||||
@@ -133,3 +134,18 @@ func TestProto3SetDefaults(t *testing.T) {
|
||||
t.Errorf("with in = %v\nproto.SetDefaults(in) =>\ngot %v\nwant %v", in, got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestUnknownFieldPreservation(t *testing.T) {
|
||||
b1 := "\x0a\x05David" // Known tag 1
|
||||
b2 := "\xc2\x0c\x06Google" // Unknown tag 200
|
||||
b := []byte(b1 + b2)
|
||||
|
||||
m := new(pb.Message)
|
||||
if err := proto.Unmarshal(b, m); err != nil {
|
||||
t.Fatalf("proto.Unmarshal: %v", err)
|
||||
}
|
||||
|
||||
if !bytes.Equal(m.XXX_unrecognized, []byte(b2)) {
|
||||
t.Fatalf("mismatching unknown fields:\ngot %q\nwant %q", m.XXX_unrecognized, b2)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user