forked from TrueCloudLab/rclone
vendor: update all dependencies
* Update all dependencies * Remove all `[[constraint]]` from Gopkg.toml * Add in the minimum number of `[[override]]` to build * Remove go get of github.com/inconshreveable/mousetrap as it is vendored * Update docs with new policy on constraints
This commit is contained in:
parent
21383877df
commit
6427029c4e
4902 changed files with 1443417 additions and 227283 deletions
24
vendor/github.com/golang/protobuf/proto/map_test.go
generated
vendored
24
vendor/github.com/golang/protobuf/proto/map_test.go
generated
vendored
|
@ -2,12 +2,36 @@ package proto_test
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
ppb "github.com/golang/protobuf/proto/proto3_proto"
|
||||
)
|
||||
|
||||
func TestMap(t *testing.T) {
|
||||
var b []byte
|
||||
fmt.Sscanf("a2010c0a044b657931120456616c31a201130a044b657932120556616c3261120456616c32a201240a044b6579330d05000000120556616c33621a0556616c3361120456616c331505000000a20100a201260a044b657934130a07536f6d6555524c1209536f6d655469746c651a08536e69707065743114", "%x", &b)
|
||||
|
||||
var m ppb.Message
|
||||
if err := proto.Unmarshal(b, &m); err != nil {
|
||||
t.Fatalf("proto.Unmarshal error: %v", err)
|
||||
}
|
||||
|
||||
got := m.StringMap
|
||||
want := map[string]string{
|
||||
"": "",
|
||||
"Key1": "Val1",
|
||||
"Key2": "Val2",
|
||||
"Key3": "Val3",
|
||||
"Key4": "",
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(got, want) {
|
||||
t.Errorf("maps differ:\ngot %#v\nwant %#v", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func marshalled() []byte {
|
||||
m := &ppb.IntMaps{}
|
||||
for i := 0; i < 1000; i++ {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue