diff options
author | 2018-07-06 21:18:14 -0700 | |
---|---|---|
committer | 2018-07-06 21:18:14 -0700 | |
commit | 459bb4531f92f8663afb6f36aa9be5b789bd591f (patch) | |
tree | f14e6c06b8e5c63612d1ff36f8cab40ae8a99d20 /vendor/github.com/golang/protobuf/proto/message_set_test.go | |
parent | 34a3fe426b33a63f2d8e02d4a70c88f137fa5410 (diff) | |
download | v2-459bb4531f92f8663afb6f36aa9be5b789bd591f.tar.gz v2-459bb4531f92f8663afb6f36aa9be5b789bd591f.tar.zst v2-459bb4531f92f8663afb6f36aa9be5b789bd591f.zip |
Update vendor dependencies
Diffstat (limited to 'vendor/github.com/golang/protobuf/proto/message_set_test.go')
-rw-r--r-- | vendor/github.com/golang/protobuf/proto/message_set_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/github.com/golang/protobuf/proto/message_set_test.go b/vendor/github.com/golang/protobuf/proto/message_set_test.go index 353a3ea7..2c170c5f 100644 --- a/vendor/github.com/golang/protobuf/proto/message_set_test.go +++ b/vendor/github.com/golang/protobuf/proto/message_set_test.go @@ -64,3 +64,14 @@ func TestUnmarshalMessageSetWithDuplicate(t *testing.T) { t.Errorf("Combined extension is %q, want %q", got, want) } } + +func TestMarshalMessageSetJSON_UnknownType(t *testing.T) { + extMap := map[int32]Extension{12345: Extension{}} + got, err := MarshalMessageSetJSON(extMap) + if err != nil { + t.Fatalf("MarshalMessageSetJSON: %v", err) + } + if want := []byte("{}"); !bytes.Equal(got, want) { + t.Errorf("MarshalMessageSetJSON(%v) = %q, want %q", extMap, got, want) + } +} |