vendor files

This commit is contained in:
Serguei Bezverkhi
2018-01-09 13:57:14 -05:00
parent 558bc6c02a
commit 7b24313bd6
16547 changed files with 4527373 additions and 0 deletions

View File

@ -0,0 +1,33 @@
# Protocol Buffers for Go with Gadgets
#
# Copyright (c) 2017, The GoGo Authors. All rights reserved.
# http://github.com/gogo/protobuf
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
regenerate:
go install github.com/gogo/protobuf/protoc-gen-combo
go install github.com/gogo/protobuf/protoc-gen-gogofast
protoc-gen-combo --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. --gogo_out=. map.proto
find combos -type d -not -name combos -exec cp map_test.go.in {}/map_test.go \;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,70 @@
// Protocol Buffers for Go with Gadgets
//
// Copyright (c) 2017, The GoGo Authors. All rights reserved.
// http://github.com/gogo/protobuf
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
package mapdefaults;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.goproto_stringer_all) = false;
option (gogoproto.goproto_enum_prefix_all) = false;
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.equal_all) = true;
option (gogoproto.verbose_equal_all) = true;
option (gogoproto.stringer_all) = true;
option (gogoproto.gostring_all) = true;
option (gogoproto.description_all) = true;
option (gogoproto.testgen_all) = true;
option (gogoproto.populate_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_enum_stringer_all) = false;
option (gogoproto.enum_stringer_all) = true;
option (gogoproto.unsafe_marshaler_all) = false;
option (gogoproto.unsafe_unmarshaler_all) = false;
message MapTest {
map<string, string> str_str = 1;
}
message FakeMap {
repeated FakeMapEntry entries = 1;
}
message FakeMapEntry {
string key = 1;
string value = 2;
string other = 3;
}

View File

@ -0,0 +1,180 @@
// Protocol Buffers for Go with Gadgets
//
// Copyright (c) 2017, The GoGo Authors. All rights reserved.
// http://github.com/gogo/protobuf
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package mapdefaults
import (
"testing"
"github.com/gogo/protobuf/proto"
)
func TestUnmarshalImplicitDefaultKeyValue1(t *testing.T) {
fm := &FakeMap{
Entries: []*FakeMapEntry{
{
Key: "foo",
Value: "",
},
{
Key: "",
Value: "bar",
},
{
Key: "as",
Value: "df",
},
},
}
serializedMsg, err := proto.Marshal(fm)
if err != nil {
t.Fatalf("Failed to serialize msg: %s", err)
}
msg := MapTest{}
err = proto.Unmarshal(serializedMsg, &msg)
if err != nil {
t.Fatalf("Unexpected error: %s", err)
}
strStr := msg.StrStr
if len(strStr) != 3 {
t.Fatal("StrStr map should have 3 key/value pairs")
}
val, ok := strStr["foo"]
if !ok {
t.Fatal("\"foo\" not found in StrStr map.")
}
if val != "" {
t.Fatalf("Unexpected value for \"foo\": %s", val)
}
val, ok = strStr[""]
if !ok {
t.Fatal("\"\" not found in StrStr map.")
}
if val != "bar" {
t.Fatalf("Unexpected value for \"\": %s", val)
}
val, ok = strStr["as"]
if !ok {
t.Fatal("\"as\" not found in StrStr map.")
}
if val != "df" {
t.Fatalf("Unexpected value for \"as\": %s", val)
}
}
func TestUnmarshalImplicitDefaultKeyValue2(t *testing.T) {
fm := &FakeMap{
Entries: []*FakeMapEntry{
{
Key: "",
Value: "",
},
},
}
serializedMsg, err := proto.Marshal(fm)
if err != nil {
t.Fatalf("Failed to serialize msg: %s", err)
}
// Sanity check
if string(serializedMsg) != "\n\x00" {
t.Fatal("Serialized bytes mismatched")
}
msg := MapTest{}
err = proto.Unmarshal(serializedMsg, &msg)
if err != nil {
t.Fatalf("Unexpected error: %s", err)
}
strStr := msg.StrStr
if len(strStr) != 1 {
t.Fatal("StrStr map should have 1 key/value pairs")
}
val, ok := strStr[""]
if !ok {
t.Fatal("\"\" not found in StrStr map.")
}
if val != "" {
t.Fatalf("Unexpected value for \"\": %s", val)
}
}
func TestUnmarshalIgnoreUnknownField(t *testing.T) {
fm := &FakeMap{
Entries: []*FakeMapEntry{
{
Key: "key",
Value: "value",
Other: "other",
},
},
}
serializedMsg, err := proto.Marshal(fm)
if err != nil {
t.Fatalf("Failed to serialize msg: %s", err)
}
msg := &MapTest{}
err = proto.Unmarshal(serializedMsg, msg)
if err != nil {
var pb proto.Message = msg
_, ok := pb.(proto.Unmarshaler)
if !ok {
// non-codegen implementation returns error when extra tags are
// present.
return
}
t.Fatalf("Unexpected error: %s", err)
}
strStr := msg.StrStr
if len(strStr) != 1 {
t.Fatal("StrStr map should have 1 key/value pairs")
}
val, ok := strStr["key"]
if !ok {
t.Fatal("\"key\" not found in StrStr map.")
}
if val != "value" {
t.Fatalf("Unexpected value for \"value\": %s", val)
}
}

View File

@ -0,0 +1,565 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: combos/both/map.proto
/*
Package mapdefaults is a generated protocol buffer package.
It is generated from these files:
combos/both/map.proto
It has these top-level messages:
MapTest
FakeMap
FakeMapEntry
*/
package mapdefaults
import testing "testing"
import math_rand "math/rand"
import time "time"
import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb"
import fmt "fmt"
import go_parser "go/parser"
import proto "github.com/gogo/protobuf/proto"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func TestMapTestProto(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &MapTest{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
littlefuzz := make([]byte, len(dAtA))
copy(littlefuzz, dAtA)
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
if len(littlefuzz) > 0 {
fuzzamount := 100
for i := 0; i < fuzzamount; i++ {
littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
}
// shouldn't panic
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
}
}
func TestMapTestMarshalTo(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, false)
size := p.Size()
dAtA := make([]byte, size)
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
_, err := p.MarshalTo(dAtA)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &MapTest{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFakeMapProto(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FakeMap{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
littlefuzz := make([]byte, len(dAtA))
copy(littlefuzz, dAtA)
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
if len(littlefuzz) > 0 {
fuzzamount := 100
for i := 0; i < fuzzamount; i++ {
littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
}
// shouldn't panic
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
}
}
func TestFakeMapMarshalTo(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, false)
size := p.Size()
dAtA := make([]byte, size)
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
_, err := p.MarshalTo(dAtA)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FakeMap{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFakeMapEntryProto(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FakeMapEntry{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
littlefuzz := make([]byte, len(dAtA))
copy(littlefuzz, dAtA)
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
if len(littlefuzz) > 0 {
fuzzamount := 100
for i := 0; i < fuzzamount; i++ {
littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
}
// shouldn't panic
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
}
}
func TestFakeMapEntryMarshalTo(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, false)
size := p.Size()
dAtA := make([]byte, size)
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
_, err := p.MarshalTo(dAtA)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FakeMapEntry{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestMapTestJSON(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, true)
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
jsondata, err := marshaler.MarshalToString(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &MapTest{}
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
}
}
func TestFakeMapJSON(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, true)
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
jsondata, err := marshaler.MarshalToString(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FakeMap{}
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
}
}
func TestFakeMapEntryJSON(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, true)
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
jsondata, err := marshaler.MarshalToString(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FakeMapEntry{}
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
}
}
func TestMapTestProtoText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, true)
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
msg := &MapTest{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestMapTestProtoCompactText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, true)
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
msg := &MapTest{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFakeMapProtoText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, true)
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
msg := &FakeMap{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFakeMapProtoCompactText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, true)
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
msg := &FakeMap{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFakeMapEntryProtoText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, true)
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
msg := &FakeMapEntry{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFakeMapEntryProtoCompactText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, true)
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
msg := &FakeMapEntry{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestMapDescription(t *testing.T) {
MapDescription()
}
func TestMapTestVerboseEqual(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedMapTest(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
panic(err)
}
msg := &MapTest{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
panic(err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err)
}
}
func TestFakeMapVerboseEqual(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMap(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
panic(err)
}
msg := &FakeMap{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
panic(err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err)
}
}
func TestFakeMapEntryVerboseEqual(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMapEntry(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
panic(err)
}
msg := &FakeMapEntry{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
panic(err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err)
}
}
func TestMapTestGoString(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedMapTest(popr, false)
s1 := p.GoString()
s2 := fmt.Sprintf("%#v", p)
if s1 != s2 {
t.Fatalf("GoString want %v got %v", s1, s2)
}
_, err := go_parser.ParseExpr(s1)
if err != nil {
t.Fatal(err)
}
}
func TestFakeMapGoString(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMap(popr, false)
s1 := p.GoString()
s2 := fmt.Sprintf("%#v", p)
if s1 != s2 {
t.Fatalf("GoString want %v got %v", s1, s2)
}
_, err := go_parser.ParseExpr(s1)
if err != nil {
t.Fatal(err)
}
}
func TestFakeMapEntryGoString(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMapEntry(popr, false)
s1 := p.GoString()
s2 := fmt.Sprintf("%#v", p)
if s1 != s2 {
t.Fatalf("GoString want %v got %v", s1, s2)
}
_, err := go_parser.ParseExpr(s1)
if err != nil {
t.Fatal(err)
}
}
func TestMapTestSize(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, true)
size2 := github_com_gogo_protobuf_proto.Size(p)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
size := p.Size()
if len(dAtA) != size {
t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA))
}
if size2 != size {
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
}
size3 := github_com_gogo_protobuf_proto.Size(p)
if size3 != size {
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
}
}
func TestFakeMapSize(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, true)
size2 := github_com_gogo_protobuf_proto.Size(p)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
size := p.Size()
if len(dAtA) != size {
t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA))
}
if size2 != size {
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
}
size3 := github_com_gogo_protobuf_proto.Size(p)
if size3 != size {
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
}
}
func TestFakeMapEntrySize(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, true)
size2 := github_com_gogo_protobuf_proto.Size(p)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
size := p.Size()
if len(dAtA) != size {
t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA))
}
if size2 != size {
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
}
size3 := github_com_gogo_protobuf_proto.Size(p)
if size3 != size {
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
}
}
func TestMapTestStringer(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedMapTest(popr, false)
s1 := p.String()
s2 := fmt.Sprintf("%v", p)
if s1 != s2 {
t.Fatalf("String want %v got %v", s1, s2)
}
}
func TestFakeMapStringer(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMap(popr, false)
s1 := p.String()
s2 := fmt.Sprintf("%v", p)
if s1 != s2 {
t.Fatalf("String want %v got %v", s1, s2)
}
}
func TestFakeMapEntryStringer(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMapEntry(popr, false)
s1 := p.String()
s2 := fmt.Sprintf("%v", p)
if s1 != s2 {
t.Fatalf("String want %v got %v", s1, s2)
}
}
//These tests are generated by github.com/gogo/protobuf/plugin/testgen

View File

@ -0,0 +1,960 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: combos/marshaler/map.proto
/*
Package mapdefaults is a generated protocol buffer package.
It is generated from these files:
combos/marshaler/map.proto
It has these top-level messages:
MapTest
FakeMap
FakeMapEntry
*/
package mapdefaults
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor"
import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
import compress_gzip "compress/gzip"
import bytes "bytes"
import io_ioutil "io/ioutil"
import strings "strings"
import reflect "reflect"
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
type MapTest struct {
StrStr map[string]string `protobuf:"bytes,1,rep,name=str_str,json=strStr" json:"str_str,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (m *MapTest) Reset() { *m = MapTest{} }
func (*MapTest) ProtoMessage() {}
func (*MapTest) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{0} }
type FakeMap struct {
Entries []*FakeMapEntry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"`
}
func (m *FakeMap) Reset() { *m = FakeMap{} }
func (*FakeMap) ProtoMessage() {}
func (*FakeMap) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{1} }
type FakeMapEntry struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
Other string `protobuf:"bytes,3,opt,name=other,proto3" json:"other,omitempty"`
}
func (m *FakeMapEntry) Reset() { *m = FakeMapEntry{} }
func (*FakeMapEntry) ProtoMessage() {}
func (*FakeMapEntry) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{2} }
func init() {
proto.RegisterType((*MapTest)(nil), "mapdefaults.MapTest")
proto.RegisterType((*FakeMap)(nil), "mapdefaults.FakeMap")
proto.RegisterType((*FakeMapEntry)(nil), "mapdefaults.FakeMapEntry")
}
func (this *MapTest) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) {
return MapDescription()
}
func (this *FakeMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) {
return MapDescription()
}
func (this *FakeMapEntry) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) {
return MapDescription()
}
func MapDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) {
d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{}
var gzipped = []byte{
// 3832 bytes of a gzipped FileDescriptorSet
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0x1b, 0xd7,
0x75, 0x26, 0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0x6a, 0xec, 0xcd, 0x42, 0x73, 0x65, 0x0b, 0x72, 0xc1, 0x81, 0x49,
0xdf, 0x4d, 0xa4, 0x96, 0x77, 0xc0, 0xbf, 0x11, 0xcd, 0xc8, 0xec, 0x61, 0x7d, 0xe3, 0xcd, 0xfb,
0xc5, 0xa9, 0xef, 0xdd, 0x2f, 0x4e, 0xfd, 0xcb, 0xfd, 0xe2, 0xd4, 0x5b, 0xf7, 0x8b, 0xb1, 0x77,
0xef, 0x17, 0x63, 0x3f, 0xba, 0x5f, 0x8c, 0xdd, 0x3b, 0x2a, 0xc6, 0xbe, 0x72, 0x54, 0x8c, 0x7d,
0xfd, 0xa8, 0x18, 0xfb, 0xce, 0x51, 0x31, 0xf6, 0xe6, 0x51, 0x31, 0xf6, 0xbd, 0xa3, 0xe2, 0xd4,
0x5b, 0x47, 0xc5, 0xd8, 0x0f, 0x8e, 0x8a, 0x53, 0xef, 0x1e, 0x15, 0x63, 0x3f, 0x3a, 0x2a, 0x4e,
0xdd, 0xfb, 0xb7, 0xe2, 0xd4, 0xfe, 0x34, 0xf5, 0xed, 0x85, 0x1f, 0x07, 0x00, 0x00, 0xff, 0xff,
0x28, 0xd2, 0x39, 0x9d, 0x5c, 0x31, 0x00, 0x00,
}
r := bytes.NewReader(gzipped)
gzipr, err := compress_gzip.NewReader(r)
if err != nil {
panic(err)
}
ungzipped, err := io_ioutil.ReadAll(gzipr)
if err != nil {
panic(err)
}
if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil {
panic(err)
}
return d
}
func (this *MapTest) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*MapTest)
if !ok {
that2, ok := that.(MapTest)
if ok {
that1 = &that2
} else {
return fmt.Errorf("that is not of type *MapTest")
}
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *MapTest but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *MapTest but is not nil && this == nil")
}
if len(this.StrStr) != len(that1.StrStr) {
return fmt.Errorf("StrStr this(%v) Not Equal that(%v)", len(this.StrStr), len(that1.StrStr))
}
for i := range this.StrStr {
if this.StrStr[i] != that1.StrStr[i] {
return fmt.Errorf("StrStr this[%v](%v) Not Equal that[%v](%v)", i, this.StrStr[i], i, that1.StrStr[i])
}
}
return nil
}
func (this *MapTest) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*MapTest)
if !ok {
that2, ok := that.(MapTest)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if len(this.StrStr) != len(that1.StrStr) {
return false
}
for i := range this.StrStr {
if this.StrStr[i] != that1.StrStr[i] {
return false
}
}
return true
}
func (this *FakeMap) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*FakeMap)
if !ok {
that2, ok := that.(FakeMap)
if ok {
that1 = &that2
} else {
return fmt.Errorf("that is not of type *FakeMap")
}
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *FakeMap but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *FakeMap but is not nil && this == nil")
}
if len(this.Entries) != len(that1.Entries) {
return fmt.Errorf("Entries this(%v) Not Equal that(%v)", len(this.Entries), len(that1.Entries))
}
for i := range this.Entries {
if !this.Entries[i].Equal(that1.Entries[i]) {
return fmt.Errorf("Entries this[%v](%v) Not Equal that[%v](%v)", i, this.Entries[i], i, that1.Entries[i])
}
}
return nil
}
func (this *FakeMap) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*FakeMap)
if !ok {
that2, ok := that.(FakeMap)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if len(this.Entries) != len(that1.Entries) {
return false
}
for i := range this.Entries {
if !this.Entries[i].Equal(that1.Entries[i]) {
return false
}
}
return true
}
func (this *FakeMapEntry) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*FakeMapEntry)
if !ok {
that2, ok := that.(FakeMapEntry)
if ok {
that1 = &that2
} else {
return fmt.Errorf("that is not of type *FakeMapEntry")
}
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *FakeMapEntry but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *FakeMapEntry but is not nil && this == nil")
}
if this.Key != that1.Key {
return fmt.Errorf("Key this(%v) Not Equal that(%v)", this.Key, that1.Key)
}
if this.Value != that1.Value {
return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value)
}
if this.Other != that1.Other {
return fmt.Errorf("Other this(%v) Not Equal that(%v)", this.Other, that1.Other)
}
return nil
}
func (this *FakeMapEntry) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*FakeMapEntry)
if !ok {
that2, ok := that.(FakeMapEntry)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if this.Key != that1.Key {
return false
}
if this.Value != that1.Value {
return false
}
if this.Other != that1.Other {
return false
}
return true
}
func (this *MapTest) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 5)
s = append(s, "&mapdefaults.MapTest{")
keysForStrStr := make([]string, 0, len(this.StrStr))
for k := range this.StrStr {
keysForStrStr = append(keysForStrStr, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStrStr)
mapStringForStrStr := "map[string]string{"
for _, k := range keysForStrStr {
mapStringForStrStr += fmt.Sprintf("%#v: %#v,", k, this.StrStr[k])
}
mapStringForStrStr += "}"
if this.StrStr != nil {
s = append(s, "StrStr: "+mapStringForStrStr+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func (this *FakeMap) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 5)
s = append(s, "&mapdefaults.FakeMap{")
if this.Entries != nil {
s = append(s, "Entries: "+fmt.Sprintf("%#v", this.Entries)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func (this *FakeMapEntry) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 7)
s = append(s, "&mapdefaults.FakeMapEntry{")
s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n")
s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
s = append(s, "Other: "+fmt.Sprintf("%#v", this.Other)+",\n")
s = append(s, "}")
return strings.Join(s, "")
}
func valueToGoStringMap(v interface{}, typ string) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
}
func (m *MapTest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *MapTest) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.StrStr) > 0 {
for k := range m.StrStr {
dAtA[i] = 0xa
i++
v := m.StrStr[k]
mapSize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v)))
i = encodeVarintMap(dAtA, i, uint64(mapSize))
dAtA[i] = 0xa
i++
i = encodeVarintMap(dAtA, i, uint64(len(k)))
i += copy(dAtA[i:], k)
dAtA[i] = 0x12
i++
i = encodeVarintMap(dAtA, i, uint64(len(v)))
i += copy(dAtA[i:], v)
}
}
return i, nil
}
func (m *FakeMap) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *FakeMap) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Entries) > 0 {
for _, msg := range m.Entries {
dAtA[i] = 0xa
i++
i = encodeVarintMap(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
return i, nil
}
func (m *FakeMapEntry) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *FakeMapEntry) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Key) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintMap(dAtA, i, uint64(len(m.Key)))
i += copy(dAtA[i:], m.Key)
}
if len(m.Value) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintMap(dAtA, i, uint64(len(m.Value)))
i += copy(dAtA[i:], m.Value)
}
if len(m.Other) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintMap(dAtA, i, uint64(len(m.Other)))
i += copy(dAtA[i:], m.Other)
}
return i, nil
}
func encodeVarintMap(dAtA []byte, offset int, v uint64) int {
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
}
func NewPopulatedMapTest(r randyMap, easy bool) *MapTest {
this := &MapTest{}
if r.Intn(10) != 0 {
v1 := r.Intn(10)
this.StrStr = make(map[string]string)
for i := 0; i < v1; i++ {
this.StrStr[randStringMap(r)] = randStringMap(r)
}
}
if !easy && r.Intn(10) != 0 {
}
return this
}
func NewPopulatedFakeMap(r randyMap, easy bool) *FakeMap {
this := &FakeMap{}
if r.Intn(10) != 0 {
v2 := r.Intn(5)
this.Entries = make([]*FakeMapEntry, v2)
for i := 0; i < v2; i++ {
this.Entries[i] = NewPopulatedFakeMapEntry(r, easy)
}
}
if !easy && r.Intn(10) != 0 {
}
return this
}
func NewPopulatedFakeMapEntry(r randyMap, easy bool) *FakeMapEntry {
this := &FakeMapEntry{}
this.Key = string(randStringMap(r))
this.Value = string(randStringMap(r))
this.Other = string(randStringMap(r))
if !easy && r.Intn(10) != 0 {
}
return this
}
type randyMap interface {
Float32() float32
Float64() float64
Int63() int64
Int31() int32
Uint32() uint32
Intn(n int) int
}
func randUTF8RuneMap(r randyMap) rune {
ru := r.Intn(62)
if ru < 10 {
return rune(ru + 48)
} else if ru < 36 {
return rune(ru + 55)
}
return rune(ru + 61)
}
func randStringMap(r randyMap) string {
v3 := r.Intn(100)
tmps := make([]rune, v3)
for i := 0; i < v3; i++ {
tmps[i] = randUTF8RuneMap(r)
}
return string(tmps)
}
func randUnrecognizedMap(r randyMap, maxFieldNumber int) (dAtA []byte) {
l := r.Intn(5)
for i := 0; i < l; i++ {
wire := r.Intn(4)
if wire == 3 {
wire = 5
}
fieldNumber := maxFieldNumber + r.Intn(100)
dAtA = randFieldMap(dAtA, r, fieldNumber, wire)
}
return dAtA
}
func randFieldMap(dAtA []byte, r randyMap, fieldNumber int, wire int) []byte {
key := uint32(fieldNumber)<<3 | uint32(wire)
switch wire {
case 0:
dAtA = encodeVarintPopulateMap(dAtA, uint64(key))
v4 := r.Int63()
if r.Intn(2) == 0 {
v4 *= -1
}
dAtA = encodeVarintPopulateMap(dAtA, uint64(v4))
case 1:
dAtA = encodeVarintPopulateMap(dAtA, uint64(key))
dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
case 2:
dAtA = encodeVarintPopulateMap(dAtA, uint64(key))
ll := r.Intn(100)
dAtA = encodeVarintPopulateMap(dAtA, uint64(ll))
for j := 0; j < ll; j++ {
dAtA = append(dAtA, byte(r.Intn(256)))
}
default:
dAtA = encodeVarintPopulateMap(dAtA, uint64(key))
dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
}
return dAtA
}
func encodeVarintPopulateMap(dAtA []byte, v uint64) []byte {
for v >= 1<<7 {
dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))
v >>= 7
}
dAtA = append(dAtA, uint8(v))
return dAtA
}
func (m *MapTest) Size() (n int) {
var l int
_ = l
if len(m.StrStr) > 0 {
for k, v := range m.StrStr {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v)))
n += mapEntrySize + 1 + sovMap(uint64(mapEntrySize))
}
}
return n
}
func (m *FakeMap) Size() (n int) {
var l int
_ = l
if len(m.Entries) > 0 {
for _, e := range m.Entries {
l = e.Size()
n += 1 + l + sovMap(uint64(l))
}
}
return n
}
func (m *FakeMapEntry) Size() (n int) {
var l int
_ = l
l = len(m.Key)
if l > 0 {
n += 1 + l + sovMap(uint64(l))
}
l = len(m.Value)
if l > 0 {
n += 1 + l + sovMap(uint64(l))
}
l = len(m.Other)
if l > 0 {
n += 1 + l + sovMap(uint64(l))
}
return n
}
func sovMap(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozMap(x uint64) (n int) {
return sovMap(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *MapTest) String() string {
if this == nil {
return "nil"
}
keysForStrStr := make([]string, 0, len(this.StrStr))
for k := range this.StrStr {
keysForStrStr = append(keysForStrStr, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStrStr)
mapStringForStrStr := "map[string]string{"
for _, k := range keysForStrStr {
mapStringForStrStr += fmt.Sprintf("%v: %v,", k, this.StrStr[k])
}
mapStringForStrStr += "}"
s := strings.Join([]string{`&MapTest{`,
`StrStr:` + mapStringForStrStr + `,`,
`}`,
}, "")
return s
}
func (this *FakeMap) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&FakeMap{`,
`Entries:` + strings.Replace(fmt.Sprintf("%v", this.Entries), "FakeMapEntry", "FakeMapEntry", 1) + `,`,
`}`,
}, "")
return s
}
func (this *FakeMapEntry) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&FakeMapEntry{`,
`Key:` + fmt.Sprintf("%v", this.Key) + `,`,
`Value:` + fmt.Sprintf("%v", this.Value) + `,`,
`Other:` + fmt.Sprintf("%v", this.Other) + `,`,
`}`,
}, "")
return s
}
func valueToStringMap(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func init() { proto.RegisterFile("combos/marshaler/map.proto", fileDescriptorMap) }
var fileDescriptorMap = []byte{
// 315 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x3f, 0x4f, 0x3a, 0x31,
0x18, 0xc7, 0xfb, 0x40, 0x7e, 0x5c, 0x7e, 0xc5, 0xc1, 0x5c, 0x1c, 0x4e, 0x86, 0x27, 0x84, 0x89,
0xc5, 0xbb, 0x44, 0x16, 0x71, 0x70, 0x30, 0xea, 0x24, 0x0b, 0xb8, 0x9b, 0x1e, 0x96, 0x3f, 0x81,
0xa3, 0x97, 0xb6, 0x67, 0xc2, 0x24, 0x2f, 0xc7, 0xd1, 0xd1, 0x97, 0xc0, 0xc8, 0xe8, 0x48, 0xeb,
0xe2, 0xc8, 0xc8, 0x68, 0xe8, 0x9d, 0xc9, 0xb9, 0xb9, 0x3d, 0x9f, 0x6f, 0x3f, 0xed, 0xf3, 0x4d,
0x69, 0x63, 0x28, 0x92, 0x58, 0xa8, 0x28, 0x61, 0x52, 0x4d, 0xd8, 0x9c, 0xcb, 0x28, 0x61, 0x69,
0x98, 0x4a, 0xa1, 0x85, 0x5f, 0x4f, 0x58, 0xfa, 0xc4, 0x47, 0x2c, 0x9b, 0x6b, 0xd5, 0x38, 0x1b,
0x4f, 0xf5, 0x24, 0x8b, 0xc3, 0xa1, 0x48, 0xa2, 0xb1, 0x18, 0x8b, 0xc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0x18, 0x62, 0xb5, 0x01, 0x00, 0x00,
}

View File

@ -0,0 +1,70 @@
// Protocol Buffers for Go with Gadgets
//
// Copyright (c) 2017, The GoGo Authors. All rights reserved.
// http://github.com/gogo/protobuf
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
package mapdefaults;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.goproto_stringer_all) = false;
option (gogoproto.goproto_enum_prefix_all) = false;
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.equal_all) = true;
option (gogoproto.verbose_equal_all) = true;
option (gogoproto.stringer_all) = true;
option (gogoproto.gostring_all) = true;
option (gogoproto.description_all) = true;
option (gogoproto.testgen_all) = true;
option (gogoproto.populate_all) = true;
option (gogoproto.unmarshaler_all) = false;
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_enum_stringer_all) = false;
option (gogoproto.enum_stringer_all) = true;
option (gogoproto.unsafe_marshaler_all) = false;
option (gogoproto.unsafe_unmarshaler_all) = false;
message MapTest {
map<string, string> str_str = 1;
}
message FakeMap {
repeated FakeMapEntry entries = 1;
}
message FakeMapEntry {
string key = 1;
string value = 2;
string other = 3;
}

View File

@ -0,0 +1,180 @@
// Protocol Buffers for Go with Gadgets
//
// Copyright (c) 2017, The GoGo Authors. All rights reserved.
// http://github.com/gogo/protobuf
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package mapdefaults
import (
"testing"
"github.com/gogo/protobuf/proto"
)
func TestUnmarshalImplicitDefaultKeyValue1(t *testing.T) {
fm := &FakeMap{
Entries: []*FakeMapEntry{
{
Key: "foo",
Value: "",
},
{
Key: "",
Value: "bar",
},
{
Key: "as",
Value: "df",
},
},
}
serializedMsg, err := proto.Marshal(fm)
if err != nil {
t.Fatalf("Failed to serialize msg: %s", err)
}
msg := MapTest{}
err = proto.Unmarshal(serializedMsg, &msg)
if err != nil {
t.Fatalf("Unexpected error: %s", err)
}
strStr := msg.StrStr
if len(strStr) != 3 {
t.Fatal("StrStr map should have 3 key/value pairs")
}
val, ok := strStr["foo"]
if !ok {
t.Fatal("\"foo\" not found in StrStr map.")
}
if val != "" {
t.Fatalf("Unexpected value for \"foo\": %s", val)
}
val, ok = strStr[""]
if !ok {
t.Fatal("\"\" not found in StrStr map.")
}
if val != "bar" {
t.Fatalf("Unexpected value for \"\": %s", val)
}
val, ok = strStr["as"]
if !ok {
t.Fatal("\"as\" not found in StrStr map.")
}
if val != "df" {
t.Fatalf("Unexpected value for \"as\": %s", val)
}
}
func TestUnmarshalImplicitDefaultKeyValue2(t *testing.T) {
fm := &FakeMap{
Entries: []*FakeMapEntry{
{
Key: "",
Value: "",
},
},
}
serializedMsg, err := proto.Marshal(fm)
if err != nil {
t.Fatalf("Failed to serialize msg: %s", err)
}
// Sanity check
if string(serializedMsg) != "\n\x00" {
t.Fatal("Serialized bytes mismatched")
}
msg := MapTest{}
err = proto.Unmarshal(serializedMsg, &msg)
if err != nil {
t.Fatalf("Unexpected error: %s", err)
}
strStr := msg.StrStr
if len(strStr) != 1 {
t.Fatal("StrStr map should have 1 key/value pairs")
}
val, ok := strStr[""]
if !ok {
t.Fatal("\"\" not found in StrStr map.")
}
if val != "" {
t.Fatalf("Unexpected value for \"\": %s", val)
}
}
func TestUnmarshalIgnoreUnknownField(t *testing.T) {
fm := &FakeMap{
Entries: []*FakeMapEntry{
{
Key: "key",
Value: "value",
Other: "other",
},
},
}
serializedMsg, err := proto.Marshal(fm)
if err != nil {
t.Fatalf("Failed to serialize msg: %s", err)
}
msg := &MapTest{}
err = proto.Unmarshal(serializedMsg, msg)
if err != nil {
var pb proto.Message = msg
_, ok := pb.(proto.Unmarshaler)
if !ok {
// non-codegen implementation returns error when extra tags are
// present.
return
}
t.Fatalf("Unexpected error: %s", err)
}
strStr := msg.StrStr
if len(strStr) != 1 {
t.Fatal("StrStr map should have 1 key/value pairs")
}
val, ok := strStr["key"]
if !ok {
t.Fatal("\"key\" not found in StrStr map.")
}
if val != "value" {
t.Fatalf("Unexpected value for \"value\": %s", val)
}
}

View File

@ -0,0 +1,565 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: combos/marshaler/map.proto
/*
Package mapdefaults is a generated protocol buffer package.
It is generated from these files:
combos/marshaler/map.proto
It has these top-level messages:
MapTest
FakeMap
FakeMapEntry
*/
package mapdefaults
import testing "testing"
import math_rand "math/rand"
import time "time"
import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb"
import fmt "fmt"
import go_parser "go/parser"
import proto "github.com/gogo/protobuf/proto"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func TestMapTestProto(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &MapTest{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
littlefuzz := make([]byte, len(dAtA))
copy(littlefuzz, dAtA)
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
if len(littlefuzz) > 0 {
fuzzamount := 100
for i := 0; i < fuzzamount; i++ {
littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
}
// shouldn't panic
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
}
}
func TestMapTestMarshalTo(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, false)
size := p.Size()
dAtA := make([]byte, size)
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
_, err := p.MarshalTo(dAtA)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &MapTest{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFakeMapProto(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FakeMap{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
littlefuzz := make([]byte, len(dAtA))
copy(littlefuzz, dAtA)
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
if len(littlefuzz) > 0 {
fuzzamount := 100
for i := 0; i < fuzzamount; i++ {
littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
}
// shouldn't panic
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
}
}
func TestFakeMapMarshalTo(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, false)
size := p.Size()
dAtA := make([]byte, size)
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
_, err := p.MarshalTo(dAtA)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FakeMap{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFakeMapEntryProto(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FakeMapEntry{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
littlefuzz := make([]byte, len(dAtA))
copy(littlefuzz, dAtA)
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
if len(littlefuzz) > 0 {
fuzzamount := 100
for i := 0; i < fuzzamount; i++ {
littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
}
// shouldn't panic
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
}
}
func TestFakeMapEntryMarshalTo(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, false)
size := p.Size()
dAtA := make([]byte, size)
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
_, err := p.MarshalTo(dAtA)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FakeMapEntry{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestMapTestJSON(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, true)
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
jsondata, err := marshaler.MarshalToString(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &MapTest{}
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
}
}
func TestFakeMapJSON(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, true)
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
jsondata, err := marshaler.MarshalToString(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FakeMap{}
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
}
}
func TestFakeMapEntryJSON(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, true)
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
jsondata, err := marshaler.MarshalToString(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FakeMapEntry{}
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
}
}
func TestMapTestProtoText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, true)
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
msg := &MapTest{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestMapTestProtoCompactText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, true)
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
msg := &MapTest{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFakeMapProtoText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, true)
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
msg := &FakeMap{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFakeMapProtoCompactText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, true)
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
msg := &FakeMap{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFakeMapEntryProtoText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, true)
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
msg := &FakeMapEntry{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFakeMapEntryProtoCompactText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, true)
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
msg := &FakeMapEntry{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestMapDescription(t *testing.T) {
MapDescription()
}
func TestMapTestVerboseEqual(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedMapTest(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
panic(err)
}
msg := &MapTest{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
panic(err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err)
}
}
func TestFakeMapVerboseEqual(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMap(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
panic(err)
}
msg := &FakeMap{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
panic(err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err)
}
}
func TestFakeMapEntryVerboseEqual(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMapEntry(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
panic(err)
}
msg := &FakeMapEntry{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
panic(err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err)
}
}
func TestMapTestGoString(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedMapTest(popr, false)
s1 := p.GoString()
s2 := fmt.Sprintf("%#v", p)
if s1 != s2 {
t.Fatalf("GoString want %v got %v", s1, s2)
}
_, err := go_parser.ParseExpr(s1)
if err != nil {
t.Fatal(err)
}
}
func TestFakeMapGoString(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMap(popr, false)
s1 := p.GoString()
s2 := fmt.Sprintf("%#v", p)
if s1 != s2 {
t.Fatalf("GoString want %v got %v", s1, s2)
}
_, err := go_parser.ParseExpr(s1)
if err != nil {
t.Fatal(err)
}
}
func TestFakeMapEntryGoString(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMapEntry(popr, false)
s1 := p.GoString()
s2 := fmt.Sprintf("%#v", p)
if s1 != s2 {
t.Fatalf("GoString want %v got %v", s1, s2)
}
_, err := go_parser.ParseExpr(s1)
if err != nil {
t.Fatal(err)
}
}
func TestMapTestSize(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, true)
size2 := github_com_gogo_protobuf_proto.Size(p)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
size := p.Size()
if len(dAtA) != size {
t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA))
}
if size2 != size {
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
}
size3 := github_com_gogo_protobuf_proto.Size(p)
if size3 != size {
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
}
}
func TestFakeMapSize(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, true)
size2 := github_com_gogo_protobuf_proto.Size(p)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
size := p.Size()
if len(dAtA) != size {
t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA))
}
if size2 != size {
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
}
size3 := github_com_gogo_protobuf_proto.Size(p)
if size3 != size {
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
}
}
func TestFakeMapEntrySize(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, true)
size2 := github_com_gogo_protobuf_proto.Size(p)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
size := p.Size()
if len(dAtA) != size {
t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA))
}
if size2 != size {
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
}
size3 := github_com_gogo_protobuf_proto.Size(p)
if size3 != size {
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
}
}
func TestMapTestStringer(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedMapTest(popr, false)
s1 := p.String()
s2 := fmt.Sprintf("%v", p)
if s1 != s2 {
t.Fatalf("String want %v got %v", s1, s2)
}
}
func TestFakeMapStringer(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMap(popr, false)
s1 := p.String()
s2 := fmt.Sprintf("%v", p)
if s1 != s2 {
t.Fatalf("String want %v got %v", s1, s2)
}
}
func TestFakeMapEntryStringer(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMapEntry(popr, false)
s1 := p.String()
s2 := fmt.Sprintf("%v", p)
if s1 != s2 {
t.Fatalf("String want %v got %v", s1, s2)
}
}
//These tests are generated by github.com/gogo/protobuf/plugin/testgen

View File

@ -0,0 +1,850 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: combos/neither/map.proto
/*
Package mapdefaults is a generated protocol buffer package.
It is generated from these files:
combos/neither/map.proto
It has these top-level messages:
MapTest
FakeMap
FakeMapEntry
*/
package mapdefaults
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor"
import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
import compress_gzip "compress/gzip"
import bytes "bytes"
import io_ioutil "io/ioutil"
import strings "strings"
import reflect "reflect"
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
type MapTest struct {
StrStr map[string]string `protobuf:"bytes,1,rep,name=str_str,json=strStr" json:"str_str,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (m *MapTest) Reset() { *m = MapTest{} }
func (*MapTest) ProtoMessage() {}
func (*MapTest) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{0} }
type FakeMap struct {
Entries []*FakeMapEntry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"`
}
func (m *FakeMap) Reset() { *m = FakeMap{} }
func (*FakeMap) ProtoMessage() {}
func (*FakeMap) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{1} }
type FakeMapEntry struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
Other string `protobuf:"bytes,3,opt,name=other,proto3" json:"other,omitempty"`
}
func (m *FakeMapEntry) Reset() { *m = FakeMapEntry{} }
func (*FakeMapEntry) ProtoMessage() {}
func (*FakeMapEntry) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{2} }
func init() {
proto.RegisterType((*MapTest)(nil), "mapdefaults.MapTest")
proto.RegisterType((*FakeMap)(nil), "mapdefaults.FakeMap")
proto.RegisterType((*FakeMapEntry)(nil), "mapdefaults.FakeMapEntry")
}
func (this *MapTest) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) {
return MapDescription()
}
func (this *FakeMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) {
return MapDescription()
}
func (this *FakeMapEntry) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) {
return MapDescription()
}
func MapDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) {
d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{}
var gzipped = []byte{
// 3833 bytes of a gzipped FileDescriptorSet
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d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3, 0xcc, 0x35, 0xf5, 0x16, 0xde, 0x56, 0x6d, 0x74, 0x01, 0x66, 0xb0, 0xe9, 0x39,
0x3a, 0x76, 0xb9, 0x01, 0x67, 0x42, 0x06, 0x70, 0x35, 0x36, 0xb2, 0xd0, 0x5c, 0xd9, 0x82, 0x5c,
0xb0, 0x63, 0xd2, 0xb1, 0x89, 0xd4, 0x22, 0x7e, 0xe4, 0xcf, 0xcf, 0xac, 0xb1, 0xbe, 0xf1, 0xd6,
0xfd, 0xe2, 0xd4, 0xf7, 0xee, 0x17, 0xa7, 0xfe, 0xf9, 0x7e, 0x71, 0xea, 0xed, 0xfb, 0xc5, 0xd8,
0x7b, 0xf7, 0x8b, 0xb1, 0x1f, 0xdd, 0x2f, 0xc6, 0xee, 0x1d, 0x15, 0x63, 0x5f, 0x3b, 0x2a, 0xc6,
0xbe, 0x79, 0x54, 0x8c, 0x7d, 0xe7, 0xa8, 0x18, 0x7b, 0xeb, 0xa8, 0x38, 0xf5, 0xbd, 0xa3, 0xe2,
0xd4, 0xdb, 0x47, 0xc5, 0xd8, 0x0f, 0x8e, 0x8a, 0x53, 0xef, 0x1d, 0x15, 0x63, 0x3f, 0x3a, 0x2a,
0x4e, 0xdd, 0xfb, 0xd7, 0xe2, 0xd4, 0xfe, 0x34, 0xf5, 0xed, 0x85, 0xff, 0x0f, 0x00, 0x00, 0xff,
0xff, 0x19, 0xcc, 0xa8, 0x90, 0x5a, 0x31, 0x00, 0x00,
}
r := bytes.NewReader(gzipped)
gzipr, err := compress_gzip.NewReader(r)
if err != nil {
panic(err)
}
ungzipped, err := io_ioutil.ReadAll(gzipr)
if err != nil {
panic(err)
}
if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil {
panic(err)
}
return d
}
func (this *MapTest) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*MapTest)
if !ok {
that2, ok := that.(MapTest)
if ok {
that1 = &that2
} else {
return fmt.Errorf("that is not of type *MapTest")
}
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *MapTest but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *MapTest but is not nil && this == nil")
}
if len(this.StrStr) != len(that1.StrStr) {
return fmt.Errorf("StrStr this(%v) Not Equal that(%v)", len(this.StrStr), len(that1.StrStr))
}
for i := range this.StrStr {
if this.StrStr[i] != that1.StrStr[i] {
return fmt.Errorf("StrStr this[%v](%v) Not Equal that[%v](%v)", i, this.StrStr[i], i, that1.StrStr[i])
}
}
return nil
}
func (this *MapTest) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*MapTest)
if !ok {
that2, ok := that.(MapTest)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if len(this.StrStr) != len(that1.StrStr) {
return false
}
for i := range this.StrStr {
if this.StrStr[i] != that1.StrStr[i] {
return false
}
}
return true
}
func (this *FakeMap) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*FakeMap)
if !ok {
that2, ok := that.(FakeMap)
if ok {
that1 = &that2
} else {
return fmt.Errorf("that is not of type *FakeMap")
}
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *FakeMap but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *FakeMap but is not nil && this == nil")
}
if len(this.Entries) != len(that1.Entries) {
return fmt.Errorf("Entries this(%v) Not Equal that(%v)", len(this.Entries), len(that1.Entries))
}
for i := range this.Entries {
if !this.Entries[i].Equal(that1.Entries[i]) {
return fmt.Errorf("Entries this[%v](%v) Not Equal that[%v](%v)", i, this.Entries[i], i, that1.Entries[i])
}
}
return nil
}
func (this *FakeMap) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*FakeMap)
if !ok {
that2, ok := that.(FakeMap)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if len(this.Entries) != len(that1.Entries) {
return false
}
for i := range this.Entries {
if !this.Entries[i].Equal(that1.Entries[i]) {
return false
}
}
return true
}
func (this *FakeMapEntry) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*FakeMapEntry)
if !ok {
that2, ok := that.(FakeMapEntry)
if ok {
that1 = &that2
} else {
return fmt.Errorf("that is not of type *FakeMapEntry")
}
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *FakeMapEntry but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *FakeMapEntry but is not nil && this == nil")
}
if this.Key != that1.Key {
return fmt.Errorf("Key this(%v) Not Equal that(%v)", this.Key, that1.Key)
}
if this.Value != that1.Value {
return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value)
}
if this.Other != that1.Other {
return fmt.Errorf("Other this(%v) Not Equal that(%v)", this.Other, that1.Other)
}
return nil
}
func (this *FakeMapEntry) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*FakeMapEntry)
if !ok {
that2, ok := that.(FakeMapEntry)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if this.Key != that1.Key {
return false
}
if this.Value != that1.Value {
return false
}
if this.Other != that1.Other {
return false
}
return true
}
func (this *MapTest) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 5)
s = append(s, "&mapdefaults.MapTest{")
keysForStrStr := make([]string, 0, len(this.StrStr))
for k := range this.StrStr {
keysForStrStr = append(keysForStrStr, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStrStr)
mapStringForStrStr := "map[string]string{"
for _, k := range keysForStrStr {
mapStringForStrStr += fmt.Sprintf("%#v: %#v,", k, this.StrStr[k])
}
mapStringForStrStr += "}"
if this.StrStr != nil {
s = append(s, "StrStr: "+mapStringForStrStr+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func (this *FakeMap) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 5)
s = append(s, "&mapdefaults.FakeMap{")
if this.Entries != nil {
s = append(s, "Entries: "+fmt.Sprintf("%#v", this.Entries)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func (this *FakeMapEntry) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 7)
s = append(s, "&mapdefaults.FakeMapEntry{")
s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n")
s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
s = append(s, "Other: "+fmt.Sprintf("%#v", this.Other)+",\n")
s = append(s, "}")
return strings.Join(s, "")
}
func valueToGoStringMap(v interface{}, typ string) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
}
func NewPopulatedMapTest(r randyMap, easy bool) *MapTest {
this := &MapTest{}
if r.Intn(10) != 0 {
v1 := r.Intn(10)
this.StrStr = make(map[string]string)
for i := 0; i < v1; i++ {
this.StrStr[randStringMap(r)] = randStringMap(r)
}
}
if !easy && r.Intn(10) != 0 {
}
return this
}
func NewPopulatedFakeMap(r randyMap, easy bool) *FakeMap {
this := &FakeMap{}
if r.Intn(10) != 0 {
v2 := r.Intn(5)
this.Entries = make([]*FakeMapEntry, v2)
for i := 0; i < v2; i++ {
this.Entries[i] = NewPopulatedFakeMapEntry(r, easy)
}
}
if !easy && r.Intn(10) != 0 {
}
return this
}
func NewPopulatedFakeMapEntry(r randyMap, easy bool) *FakeMapEntry {
this := &FakeMapEntry{}
this.Key = string(randStringMap(r))
this.Value = string(randStringMap(r))
this.Other = string(randStringMap(r))
if !easy && r.Intn(10) != 0 {
}
return this
}
type randyMap interface {
Float32() float32
Float64() float64
Int63() int64
Int31() int32
Uint32() uint32
Intn(n int) int
}
func randUTF8RuneMap(r randyMap) rune {
ru := r.Intn(62)
if ru < 10 {
return rune(ru + 48)
} else if ru < 36 {
return rune(ru + 55)
}
return rune(ru + 61)
}
func randStringMap(r randyMap) string {
v3 := r.Intn(100)
tmps := make([]rune, v3)
for i := 0; i < v3; i++ {
tmps[i] = randUTF8RuneMap(r)
}
return string(tmps)
}
func randUnrecognizedMap(r randyMap, maxFieldNumber int) (dAtA []byte) {
l := r.Intn(5)
for i := 0; i < l; i++ {
wire := r.Intn(4)
if wire == 3 {
wire = 5
}
fieldNumber := maxFieldNumber + r.Intn(100)
dAtA = randFieldMap(dAtA, r, fieldNumber, wire)
}
return dAtA
}
func randFieldMap(dAtA []byte, r randyMap, fieldNumber int, wire int) []byte {
key := uint32(fieldNumber)<<3 | uint32(wire)
switch wire {
case 0:
dAtA = encodeVarintPopulateMap(dAtA, uint64(key))
v4 := r.Int63()
if r.Intn(2) == 0 {
v4 *= -1
}
dAtA = encodeVarintPopulateMap(dAtA, uint64(v4))
case 1:
dAtA = encodeVarintPopulateMap(dAtA, uint64(key))
dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
case 2:
dAtA = encodeVarintPopulateMap(dAtA, uint64(key))
ll := r.Intn(100)
dAtA = encodeVarintPopulateMap(dAtA, uint64(ll))
for j := 0; j < ll; j++ {
dAtA = append(dAtA, byte(r.Intn(256)))
}
default:
dAtA = encodeVarintPopulateMap(dAtA, uint64(key))
dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
}
return dAtA
}
func encodeVarintPopulateMap(dAtA []byte, v uint64) []byte {
for v >= 1<<7 {
dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))
v >>= 7
}
dAtA = append(dAtA, uint8(v))
return dAtA
}
func (m *MapTest) Size() (n int) {
var l int
_ = l
if len(m.StrStr) > 0 {
for k, v := range m.StrStr {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v)))
n += mapEntrySize + 1 + sovMap(uint64(mapEntrySize))
}
}
return n
}
func (m *FakeMap) Size() (n int) {
var l int
_ = l
if len(m.Entries) > 0 {
for _, e := range m.Entries {
l = e.Size()
n += 1 + l + sovMap(uint64(l))
}
}
return n
}
func (m *FakeMapEntry) Size() (n int) {
var l int
_ = l
l = len(m.Key)
if l > 0 {
n += 1 + l + sovMap(uint64(l))
}
l = len(m.Value)
if l > 0 {
n += 1 + l + sovMap(uint64(l))
}
l = len(m.Other)
if l > 0 {
n += 1 + l + sovMap(uint64(l))
}
return n
}
func sovMap(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozMap(x uint64) (n int) {
return sovMap(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *MapTest) String() string {
if this == nil {
return "nil"
}
keysForStrStr := make([]string, 0, len(this.StrStr))
for k := range this.StrStr {
keysForStrStr = append(keysForStrStr, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForStrStr)
mapStringForStrStr := "map[string]string{"
for _, k := range keysForStrStr {
mapStringForStrStr += fmt.Sprintf("%v: %v,", k, this.StrStr[k])
}
mapStringForStrStr += "}"
s := strings.Join([]string{`&MapTest{`,
`StrStr:` + mapStringForStrStr + `,`,
`}`,
}, "")
return s
}
func (this *FakeMap) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&FakeMap{`,
`Entries:` + strings.Replace(fmt.Sprintf("%v", this.Entries), "FakeMapEntry", "FakeMapEntry", 1) + `,`,
`}`,
}, "")
return s
}
func (this *FakeMapEntry) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&FakeMapEntry{`,
`Key:` + fmt.Sprintf("%v", this.Key) + `,`,
`Value:` + fmt.Sprintf("%v", this.Value) + `,`,
`Other:` + fmt.Sprintf("%v", this.Other) + `,`,
`}`,
}, "")
return s
}
func valueToStringMap(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func init() { proto.RegisterFile("combos/neither/map.proto", fileDescriptorMap) }
var fileDescriptorMap = []byte{
// 313 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x3f, 0x4f, 0x32, 0x41,
0x10, 0x87, 0x77, 0x20, 0x2f, 0x97, 0x77, 0xb1, 0x30, 0x17, 0x8b, 0x93, 0x62, 0x42, 0xa8, 0x68,
0xbc, 0x4b, 0xa4, 0x11, 0x0b, 0x0b, 0xa3, 0x56, 0xd2, 0x80, 0xbd, 0xd9, 0xc3, 0xe5, 0x4f, 0xe0,
0xd8, 0xcb, 0xee, 0x9e, 0x09, 0x95, 0x7c, 0x1c, 0x4b, 0x4b, 0x3f, 0x02, 0x25, 0xa5, 0x25, 0xbb,
0x36, 0x96, 0x94, 0x94, 0x86, 0xbd, 0x33, 0x39, 0x3b, 0xbb, 0x79, 0x7e, 0xfb, 0xec, 0xcc, 0x64,
0x68, 0x30, 0x14, 0x49, 0x2c, 0x54, 0xb4, 0xe0, 0x53, 0x3d, 0xe1, 0x32, 0x4a, 0x58, 0x1a, 0xa6,
0x52, 0x68, 0xe1, 0xd7, 0x13, 0x96, 0x3e, 0xf1, 0x11, 0xcb, 0xe6, 0x5a, 0x35, 0xce, 0xc6, 0x53,
0x3d, 0xc9, 0xe2, 0x70, 0x28, 0x92, 0x68, 0x2c, 0xc6, 0x22, 0x72, 0x4e, 0x9c, 0x8d, 0x1c, 0x39,
0x70, 0x55, 0xfe, 0xb7, 0xf5, 0x42, 0xbd, 0x1e, 0x4b, 0x1f, 0xb8, 0xd2, 0x7e, 0x97, 0x7a, 0x4a,
0xcb, 0x47, 0xa5, 0x65, 0x00, 0xcd, 0x6a, 0xbb, 0x7e, 0xde, 0x0c, 0x4b, 0x8d, 0xc3, 0x42, 0x0b,
0x07, 0x5a, 0x0e, 0xb4, 0xbc, 0x5d, 0x68, 0xb9, 0xec, 0xd7, 0x94, 0x83, 0x46, 0x97, 0xd6, 0x4b,
0xb1, 0x7f, 0x4c, 0xab, 0x33, 0xbe, 0x0c, 0xa0, 0x09, 0xed, 0xff, 0xfd, 0x43, 0xe9, 0x9f, 0xd0,
0x7f, 0xcf, 0x6c, 0x9e, 0xf1, 0xa0, 0xe2, 0xb2, 0x1c, 0x2e, 0x2b, 0x17, 0xd0, 0xba, 0xa2, 0xde,
0x1d, 0x9b, 0xf1, 0x1e, 0x4b, 0xfd, 0x0e, 0xf5, 0xf8, 0x42, 0xcb, 0x29, 0x57, 0xc5, 0x02, 0xa7,
0xbf, 0x16, 0x28, 0xb4, 0x7c, 0xf2, 0x8f, 0xd9, 0xba, 0xa7, 0x47, 0xe5, 0x87, 0xbf, 0xce, 0x3e,
0xa4, 0xe2, 0x70, 0xc7, 0xa0, 0x9a, 0xa7, 0x0e, 0xae, 0x6f, 0xd6, 0x06, 0xc9, 0xc6, 0x20, 0xf9,
0x30, 0x48, 0xb6, 0x06, 0x61, 0x67, 0x10, 0xf6, 0x06, 0x61, 0x65, 0x11, 0x5e, 0x2d, 0xc2, 0x9b,
0x45, 0x78, 0xb7, 0x08, 0x6b, 0x8b, 0x64, 0x63, 0x91, 0x6c, 0x2d, 0xc2, 0x97, 0x45, 0xb2, 0xb3,
0x08, 0x7b, 0x8b, 0x64, 0xf5, 0x89, 0x24, 0xae, 0xb9, 0xdb, 0x76, 0xbe, 0x03, 0x00, 0x00, 0xff,
0xff, 0x9d, 0x34, 0x83, 0xd1, 0xb3, 0x01, 0x00, 0x00,
}

View File

@ -0,0 +1,70 @@
// Protocol Buffers for Go with Gadgets
//
// Copyright (c) 2017, The GoGo Authors. All rights reserved.
// http://github.com/gogo/protobuf
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
package mapdefaults;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.goproto_stringer_all) = false;
option (gogoproto.goproto_enum_prefix_all) = false;
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.equal_all) = true;
option (gogoproto.verbose_equal_all) = true;
option (gogoproto.stringer_all) = true;
option (gogoproto.gostring_all) = true;
option (gogoproto.description_all) = true;
option (gogoproto.testgen_all) = true;
option (gogoproto.populate_all) = true;
option (gogoproto.unmarshaler_all) = false;
option (gogoproto.marshaler_all) = false;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_enum_stringer_all) = false;
option (gogoproto.enum_stringer_all) = true;
option (gogoproto.unsafe_marshaler_all) = false;
option (gogoproto.unsafe_unmarshaler_all) = false;
message MapTest {
map<string, string> str_str = 1;
}
message FakeMap {
repeated FakeMapEntry entries = 1;
}
message FakeMapEntry {
string key = 1;
string value = 2;
string other = 3;
}

View File

@ -0,0 +1,180 @@
// Protocol Buffers for Go with Gadgets
//
// Copyright (c) 2017, The GoGo Authors. All rights reserved.
// http://github.com/gogo/protobuf
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package mapdefaults
import (
"testing"
"github.com/gogo/protobuf/proto"
)
func TestUnmarshalImplicitDefaultKeyValue1(t *testing.T) {
fm := &FakeMap{
Entries: []*FakeMapEntry{
{
Key: "foo",
Value: "",
},
{
Key: "",
Value: "bar",
},
{
Key: "as",
Value: "df",
},
},
}
serializedMsg, err := proto.Marshal(fm)
if err != nil {
t.Fatalf("Failed to serialize msg: %s", err)
}
msg := MapTest{}
err = proto.Unmarshal(serializedMsg, &msg)
if err != nil {
t.Fatalf("Unexpected error: %s", err)
}
strStr := msg.StrStr
if len(strStr) != 3 {
t.Fatal("StrStr map should have 3 key/value pairs")
}
val, ok := strStr["foo"]
if !ok {
t.Fatal("\"foo\" not found in StrStr map.")
}
if val != "" {
t.Fatalf("Unexpected value for \"foo\": %s", val)
}
val, ok = strStr[""]
if !ok {
t.Fatal("\"\" not found in StrStr map.")
}
if val != "bar" {
t.Fatalf("Unexpected value for \"\": %s", val)
}
val, ok = strStr["as"]
if !ok {
t.Fatal("\"as\" not found in StrStr map.")
}
if val != "df" {
t.Fatalf("Unexpected value for \"as\": %s", val)
}
}
func TestUnmarshalImplicitDefaultKeyValue2(t *testing.T) {
fm := &FakeMap{
Entries: []*FakeMapEntry{
{
Key: "",
Value: "",
},
},
}
serializedMsg, err := proto.Marshal(fm)
if err != nil {
t.Fatalf("Failed to serialize msg: %s", err)
}
// Sanity check
if string(serializedMsg) != "\n\x00" {
t.Fatal("Serialized bytes mismatched")
}
msg := MapTest{}
err = proto.Unmarshal(serializedMsg, &msg)
if err != nil {
t.Fatalf("Unexpected error: %s", err)
}
strStr := msg.StrStr
if len(strStr) != 1 {
t.Fatal("StrStr map should have 1 key/value pairs")
}
val, ok := strStr[""]
if !ok {
t.Fatal("\"\" not found in StrStr map.")
}
if val != "" {
t.Fatalf("Unexpected value for \"\": %s", val)
}
}
func TestUnmarshalIgnoreUnknownField(t *testing.T) {
fm := &FakeMap{
Entries: []*FakeMapEntry{
{
Key: "key",
Value: "value",
Other: "other",
},
},
}
serializedMsg, err := proto.Marshal(fm)
if err != nil {
t.Fatalf("Failed to serialize msg: %s", err)
}
msg := &MapTest{}
err = proto.Unmarshal(serializedMsg, msg)
if err != nil {
var pb proto.Message = msg
_, ok := pb.(proto.Unmarshaler)
if !ok {
// non-codegen implementation returns error when extra tags are
// present.
return
}
t.Fatalf("Unexpected error: %s", err)
}
strStr := msg.StrStr
if len(strStr) != 1 {
t.Fatal("StrStr map should have 1 key/value pairs")
}
val, ok := strStr["key"]
if !ok {
t.Fatal("\"key\" not found in StrStr map.")
}
if val != "value" {
t.Fatalf("Unexpected value for \"value\": %s", val)
}
}

View File

@ -0,0 +1,481 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: combos/neither/map.proto
/*
Package mapdefaults is a generated protocol buffer package.
It is generated from these files:
combos/neither/map.proto
It has these top-level messages:
MapTest
FakeMap
FakeMapEntry
*/
package mapdefaults
import testing "testing"
import math_rand "math/rand"
import time "time"
import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb"
import fmt "fmt"
import go_parser "go/parser"
import proto "github.com/gogo/protobuf/proto"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func TestMapTestProto(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &MapTest{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
littlefuzz := make([]byte, len(dAtA))
copy(littlefuzz, dAtA)
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
if len(littlefuzz) > 0 {
fuzzamount := 100
for i := 0; i < fuzzamount; i++ {
littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
}
// shouldn't panic
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
}
}
func TestFakeMapProto(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FakeMap{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
littlefuzz := make([]byte, len(dAtA))
copy(littlefuzz, dAtA)
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
if len(littlefuzz) > 0 {
fuzzamount := 100
for i := 0; i < fuzzamount; i++ {
littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
}
// shouldn't panic
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
}
}
func TestFakeMapEntryProto(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FakeMapEntry{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
littlefuzz := make([]byte, len(dAtA))
copy(littlefuzz, dAtA)
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
if len(littlefuzz) > 0 {
fuzzamount := 100
for i := 0; i < fuzzamount; i++ {
littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
}
// shouldn't panic
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
}
}
func TestMapTestJSON(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, true)
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
jsondata, err := marshaler.MarshalToString(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &MapTest{}
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
}
}
func TestFakeMapJSON(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, true)
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
jsondata, err := marshaler.MarshalToString(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FakeMap{}
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
}
}
func TestFakeMapEntryJSON(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, true)
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
jsondata, err := marshaler.MarshalToString(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FakeMapEntry{}
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
}
}
func TestMapTestProtoText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, true)
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
msg := &MapTest{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestMapTestProtoCompactText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, true)
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
msg := &MapTest{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFakeMapProtoText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, true)
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
msg := &FakeMap{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFakeMapProtoCompactText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, true)
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
msg := &FakeMap{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFakeMapEntryProtoText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, true)
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
msg := &FakeMapEntry{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFakeMapEntryProtoCompactText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, true)
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
msg := &FakeMapEntry{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestMapDescription(t *testing.T) {
MapDescription()
}
func TestMapTestVerboseEqual(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedMapTest(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
panic(err)
}
msg := &MapTest{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
panic(err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err)
}
}
func TestFakeMapVerboseEqual(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMap(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
panic(err)
}
msg := &FakeMap{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
panic(err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err)
}
}
func TestFakeMapEntryVerboseEqual(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMapEntry(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
panic(err)
}
msg := &FakeMapEntry{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
panic(err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err)
}
}
func TestMapTestGoString(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedMapTest(popr, false)
s1 := p.GoString()
s2 := fmt.Sprintf("%#v", p)
if s1 != s2 {
t.Fatalf("GoString want %v got %v", s1, s2)
}
_, err := go_parser.ParseExpr(s1)
if err != nil {
t.Fatal(err)
}
}
func TestFakeMapGoString(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMap(popr, false)
s1 := p.GoString()
s2 := fmt.Sprintf("%#v", p)
if s1 != s2 {
t.Fatalf("GoString want %v got %v", s1, s2)
}
_, err := go_parser.ParseExpr(s1)
if err != nil {
t.Fatal(err)
}
}
func TestFakeMapEntryGoString(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMapEntry(popr, false)
s1 := p.GoString()
s2 := fmt.Sprintf("%#v", p)
if s1 != s2 {
t.Fatalf("GoString want %v got %v", s1, s2)
}
_, err := go_parser.ParseExpr(s1)
if err != nil {
t.Fatal(err)
}
}
func TestMapTestSize(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, true)
size2 := github_com_gogo_protobuf_proto.Size(p)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
size := p.Size()
if len(dAtA) != size {
t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA))
}
if size2 != size {
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
}
size3 := github_com_gogo_protobuf_proto.Size(p)
if size3 != size {
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
}
}
func TestFakeMapSize(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, true)
size2 := github_com_gogo_protobuf_proto.Size(p)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
size := p.Size()
if len(dAtA) != size {
t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA))
}
if size2 != size {
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
}
size3 := github_com_gogo_protobuf_proto.Size(p)
if size3 != size {
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
}
}
func TestFakeMapEntrySize(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, true)
size2 := github_com_gogo_protobuf_proto.Size(p)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
size := p.Size()
if len(dAtA) != size {
t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA))
}
if size2 != size {
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
}
size3 := github_com_gogo_protobuf_proto.Size(p)
if size3 != size {
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
}
}
func TestMapTestStringer(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedMapTest(popr, false)
s1 := p.String()
s2 := fmt.Sprintf("%v", p)
if s1 != s2 {
t.Fatalf("String want %v got %v", s1, s2)
}
}
func TestFakeMapStringer(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMap(popr, false)
s1 := p.String()
s2 := fmt.Sprintf("%v", p)
if s1 != s2 {
t.Fatalf("String want %v got %v", s1, s2)
}
}
func TestFakeMapEntryStringer(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMapEntry(popr, false)
s1 := p.String()
s2 := fmt.Sprintf("%v", p)
if s1 != s2 {
t.Fatalf("String want %v got %v", s1, s2)
}
}
//These tests are generated by github.com/gogo/protobuf/plugin/testgen

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,70 @@
// Protocol Buffers for Go with Gadgets
//
// Copyright (c) 2017, The GoGo Authors. All rights reserved.
// http://github.com/gogo/protobuf
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
package mapdefaults;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.goproto_stringer_all) = false;
option (gogoproto.goproto_enum_prefix_all) = false;
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.equal_all) = true;
option (gogoproto.verbose_equal_all) = true;
option (gogoproto.stringer_all) = true;
option (gogoproto.gostring_all) = true;
option (gogoproto.description_all) = true;
option (gogoproto.testgen_all) = true;
option (gogoproto.populate_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.marshaler_all) = false;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_enum_stringer_all) = false;
option (gogoproto.enum_stringer_all) = true;
option (gogoproto.unsafe_marshaler_all) = false;
option (gogoproto.unsafe_unmarshaler_all) = false;
message MapTest {
map<string, string> str_str = 1;
}
message FakeMap {
repeated FakeMapEntry entries = 1;
}
message FakeMapEntry {
string key = 1;
string value = 2;
string other = 3;
}

View File

@ -0,0 +1,180 @@
// Protocol Buffers for Go with Gadgets
//
// Copyright (c) 2017, The GoGo Authors. All rights reserved.
// http://github.com/gogo/protobuf
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package mapdefaults
import (
"testing"
"github.com/gogo/protobuf/proto"
)
func TestUnmarshalImplicitDefaultKeyValue1(t *testing.T) {
fm := &FakeMap{
Entries: []*FakeMapEntry{
{
Key: "foo",
Value: "",
},
{
Key: "",
Value: "bar",
},
{
Key: "as",
Value: "df",
},
},
}
serializedMsg, err := proto.Marshal(fm)
if err != nil {
t.Fatalf("Failed to serialize msg: %s", err)
}
msg := MapTest{}
err = proto.Unmarshal(serializedMsg, &msg)
if err != nil {
t.Fatalf("Unexpected error: %s", err)
}
strStr := msg.StrStr
if len(strStr) != 3 {
t.Fatal("StrStr map should have 3 key/value pairs")
}
val, ok := strStr["foo"]
if !ok {
t.Fatal("\"foo\" not found in StrStr map.")
}
if val != "" {
t.Fatalf("Unexpected value for \"foo\": %s", val)
}
val, ok = strStr[""]
if !ok {
t.Fatal("\"\" not found in StrStr map.")
}
if val != "bar" {
t.Fatalf("Unexpected value for \"\": %s", val)
}
val, ok = strStr["as"]
if !ok {
t.Fatal("\"as\" not found in StrStr map.")
}
if val != "df" {
t.Fatalf("Unexpected value for \"as\": %s", val)
}
}
func TestUnmarshalImplicitDefaultKeyValue2(t *testing.T) {
fm := &FakeMap{
Entries: []*FakeMapEntry{
{
Key: "",
Value: "",
},
},
}
serializedMsg, err := proto.Marshal(fm)
if err != nil {
t.Fatalf("Failed to serialize msg: %s", err)
}
// Sanity check
if string(serializedMsg) != "\n\x00" {
t.Fatal("Serialized bytes mismatched")
}
msg := MapTest{}
err = proto.Unmarshal(serializedMsg, &msg)
if err != nil {
t.Fatalf("Unexpected error: %s", err)
}
strStr := msg.StrStr
if len(strStr) != 1 {
t.Fatal("StrStr map should have 1 key/value pairs")
}
val, ok := strStr[""]
if !ok {
t.Fatal("\"\" not found in StrStr map.")
}
if val != "" {
t.Fatalf("Unexpected value for \"\": %s", val)
}
}
func TestUnmarshalIgnoreUnknownField(t *testing.T) {
fm := &FakeMap{
Entries: []*FakeMapEntry{
{
Key: "key",
Value: "value",
Other: "other",
},
},
}
serializedMsg, err := proto.Marshal(fm)
if err != nil {
t.Fatalf("Failed to serialize msg: %s", err)
}
msg := &MapTest{}
err = proto.Unmarshal(serializedMsg, msg)
if err != nil {
var pb proto.Message = msg
_, ok := pb.(proto.Unmarshaler)
if !ok {
// non-codegen implementation returns error when extra tags are
// present.
return
}
t.Fatalf("Unexpected error: %s", err)
}
strStr := msg.StrStr
if len(strStr) != 1 {
t.Fatal("StrStr map should have 1 key/value pairs")
}
val, ok := strStr["key"]
if !ok {
t.Fatal("\"key\" not found in StrStr map.")
}
if val != "value" {
t.Fatalf("Unexpected value for \"value\": %s", val)
}
}

View File

@ -0,0 +1,481 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: combos/unmarshaler/map.proto
/*
Package mapdefaults is a generated protocol buffer package.
It is generated from these files:
combos/unmarshaler/map.proto
It has these top-level messages:
MapTest
FakeMap
FakeMapEntry
*/
package mapdefaults
import testing "testing"
import math_rand "math/rand"
import time "time"
import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb"
import fmt "fmt"
import go_parser "go/parser"
import proto "github.com/gogo/protobuf/proto"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func TestMapTestProto(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &MapTest{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
littlefuzz := make([]byte, len(dAtA))
copy(littlefuzz, dAtA)
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
if len(littlefuzz) > 0 {
fuzzamount := 100
for i := 0; i < fuzzamount; i++ {
littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
}
// shouldn't panic
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
}
}
func TestFakeMapProto(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FakeMap{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
littlefuzz := make([]byte, len(dAtA))
copy(littlefuzz, dAtA)
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
if len(littlefuzz) > 0 {
fuzzamount := 100
for i := 0; i < fuzzamount; i++ {
littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
}
// shouldn't panic
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
}
}
func TestFakeMapEntryProto(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FakeMapEntry{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
littlefuzz := make([]byte, len(dAtA))
copy(littlefuzz, dAtA)
for i := range dAtA {
dAtA[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
if len(littlefuzz) > 0 {
fuzzamount := 100
for i := 0; i < fuzzamount; i++ {
littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))
littlefuzz = append(littlefuzz, byte(popr.Intn(256)))
}
// shouldn't panic
_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)
}
}
func TestMapTestJSON(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, true)
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
jsondata, err := marshaler.MarshalToString(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &MapTest{}
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
}
}
func TestFakeMapJSON(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, true)
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
jsondata, err := marshaler.MarshalToString(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FakeMap{}
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
}
}
func TestFakeMapEntryJSON(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, true)
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
jsondata, err := marshaler.MarshalToString(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
msg := &FakeMapEntry{}
err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)
}
}
func TestMapTestProtoText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, true)
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
msg := &MapTest{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestMapTestProtoCompactText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, true)
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
msg := &MapTest{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFakeMapProtoText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, true)
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
msg := &FakeMap{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFakeMapProtoCompactText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, true)
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
msg := &FakeMap{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFakeMapEntryProtoText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, true)
dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p)
msg := &FakeMapEntry{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestFakeMapEntryProtoCompactText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, true)
dAtA := github_com_gogo_protobuf_proto.CompactTextString(p)
msg := &FakeMapEntry{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
func TestMapDescription(t *testing.T) {
MapDescription()
}
func TestMapTestVerboseEqual(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedMapTest(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
panic(err)
}
msg := &MapTest{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
panic(err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err)
}
}
func TestFakeMapVerboseEqual(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMap(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
panic(err)
}
msg := &FakeMap{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
panic(err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err)
}
}
func TestFakeMapEntryVerboseEqual(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMapEntry(popr, false)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
panic(err)
}
msg := &FakeMapEntry{}
if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil {
panic(err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err)
}
}
func TestMapTestGoString(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedMapTest(popr, false)
s1 := p.GoString()
s2 := fmt.Sprintf("%#v", p)
if s1 != s2 {
t.Fatalf("GoString want %v got %v", s1, s2)
}
_, err := go_parser.ParseExpr(s1)
if err != nil {
t.Fatal(err)
}
}
func TestFakeMapGoString(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMap(popr, false)
s1 := p.GoString()
s2 := fmt.Sprintf("%#v", p)
if s1 != s2 {
t.Fatalf("GoString want %v got %v", s1, s2)
}
_, err := go_parser.ParseExpr(s1)
if err != nil {
t.Fatal(err)
}
}
func TestFakeMapEntryGoString(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMapEntry(popr, false)
s1 := p.GoString()
s2 := fmt.Sprintf("%#v", p)
if s1 != s2 {
t.Fatalf("GoString want %v got %v", s1, s2)
}
_, err := go_parser.ParseExpr(s1)
if err != nil {
t.Fatal(err)
}
}
func TestMapTestSize(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedMapTest(popr, true)
size2 := github_com_gogo_protobuf_proto.Size(p)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
size := p.Size()
if len(dAtA) != size {
t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA))
}
if size2 != size {
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
}
size3 := github_com_gogo_protobuf_proto.Size(p)
if size3 != size {
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
}
}
func TestFakeMapSize(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMap(popr, true)
size2 := github_com_gogo_protobuf_proto.Size(p)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
size := p.Size()
if len(dAtA) != size {
t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA))
}
if size2 != size {
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
}
size3 := github_com_gogo_protobuf_proto.Size(p)
if size3 != size {
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
}
}
func TestFakeMapEntrySize(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedFakeMapEntry(popr, true)
size2 := github_com_gogo_protobuf_proto.Size(p)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
size := p.Size()
if len(dAtA) != size {
t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA))
}
if size2 != size {
t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)
}
size3 := github_com_gogo_protobuf_proto.Size(p)
if size3 != size {
t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)
}
}
func TestMapTestStringer(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedMapTest(popr, false)
s1 := p.String()
s2 := fmt.Sprintf("%v", p)
if s1 != s2 {
t.Fatalf("String want %v got %v", s1, s2)
}
}
func TestFakeMapStringer(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMap(popr, false)
s1 := p.String()
s2 := fmt.Sprintf("%v", p)
if s1 != s2 {
t.Fatalf("String want %v got %v", s1, s2)
}
}
func TestFakeMapEntryStringer(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedFakeMapEntry(popr, false)
s1 := p.String()
s2 := fmt.Sprintf("%v", p)
if s1 != s2 {
t.Fatalf("String want %v got %v", s1, s2)
}
}
//These tests are generated by github.com/gogo/protobuf/plugin/testgen

View File

@ -0,0 +1,414 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: map.proto
/*
Package mapdefaults is a generated protocol buffer package.
It is generated from these files:
map.proto
It has these top-level messages:
MapTest
*/
package mapdefaults
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import io "io"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
type MapTest struct {
StrStr map[string]string `protobuf:"bytes,1,rep,name=str_str,json=strStr" json:"str_str,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (m *MapTest) Reset() { *m = MapTest{} }
func (m *MapTest) String() string { return proto.CompactTextString(m) }
func (*MapTest) ProtoMessage() {}
func (*MapTest) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{0} }
func (m *MapTest) GetStrStr() map[string]string {
if m != nil {
return m.StrStr
}
return nil
}
func init() {
proto.RegisterType((*MapTest)(nil), "mapdefaults.MapTest")
}
func (m *MapTest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *MapTest) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.StrStr) > 0 {
for k := range m.StrStr {
dAtA[i] = 0xa
i++
v := m.StrStr[k]
mapSize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v)))
i = encodeVarintMap(dAtA, i, uint64(mapSize))
dAtA[i] = 0xa
i++
i = encodeVarintMap(dAtA, i, uint64(len(k)))
i += copy(dAtA[i:], k)
dAtA[i] = 0x12
i++
i = encodeVarintMap(dAtA, i, uint64(len(v)))
i += copy(dAtA[i:], v)
}
}
return i, nil
}
func encodeFixed64Map(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
dAtA[offset+1] = uint8(v >> 8)
dAtA[offset+2] = uint8(v >> 16)
dAtA[offset+3] = uint8(v >> 24)
dAtA[offset+4] = uint8(v >> 32)
dAtA[offset+5] = uint8(v >> 40)
dAtA[offset+6] = uint8(v >> 48)
dAtA[offset+7] = uint8(v >> 56)
return offset + 8
}
func encodeFixed32Map(dAtA []byte, offset int, v uint32) int {
dAtA[offset] = uint8(v)
dAtA[offset+1] = uint8(v >> 8)
dAtA[offset+2] = uint8(v >> 16)
dAtA[offset+3] = uint8(v >> 24)
return offset + 4
}
func encodeVarintMap(dAtA []byte, offset int, v uint64) int {
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
}
func (m *MapTest) Size() (n int) {
var l int
_ = l
if len(m.StrStr) > 0 {
for k, v := range m.StrStr {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v)))
n += mapEntrySize + 1 + sovMap(uint64(mapEntrySize))
}
}
return n
}
func sovMap(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozMap(x uint64) (n int) {
return sovMap(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *MapTest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMap
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: MapTest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MapTest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field StrStr", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMap
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthMap
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.StrStr == nil {
m.StrStr = make(map[string]string)
}
var mapkey string
var mapvalue string
for iNdEx < postIndex {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMap
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
if fieldNum == 1 {
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMap
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return ErrInvalidLengthMap
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
} else {
var stringLenmapvalue uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMap
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapvalue |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapvalue := int(stringLenmapvalue)
if intStringLenmapvalue < 0 {
return ErrInvalidLengthMap
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
iNdEx = postStringIndexmapvalue
}
}
m.StrStr[mapkey] = mapvalue
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipMap(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthMap
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipMap(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowMap
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowMap
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
return iNdEx, nil
case 1:
iNdEx += 8
return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowMap
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthMap
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowMap
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
innerWire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
innerWireType := int(innerWire & 0x7)
if innerWireType == 4 {
break
}
next, err := skipMap(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
}
return iNdEx, nil
case 4:
return iNdEx, nil
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
}
panic("unreachable")
}
var (
ErrInvalidLengthMap = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowMap = fmt.Errorf("proto: integer overflow")
)
func init() { proto.RegisterFile("map.proto", fileDescriptorMap) }
var fileDescriptorMap = []byte{
// 161 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcc, 0x4d, 0x2c, 0xd0,
0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xce, 0x4d, 0x2c, 0x48, 0x49, 0x4d, 0x4b, 0x2c, 0xcd,
0x29, 0x29, 0x56, 0xaa, 0xe7, 0x62, 0xf7, 0x4d, 0x2c, 0x08, 0x49, 0x2d, 0x2e, 0x11, 0xb2, 0xe4,
0x62, 0x2f, 0x2e, 0x29, 0x8a, 0x2f, 0x2e, 0x29, 0x92, 0x60, 0x54, 0x60, 0xd6, 0xe0, 0x36, 0x52,
0xd0, 0x43, 0x52, 0xa9, 0x07, 0x55, 0xa6, 0x17, 0x5c, 0x52, 0x14, 0x5c, 0x52, 0xe4, 0x9a, 0x57,
0x52, 0x54, 0x19, 0xc4, 0x56, 0x0c, 0xe6, 0x48, 0x59, 0x72, 0x71, 0x23, 0x09, 0x0b, 0x09, 0x70,
0x31, 0x67, 0xa7, 0x56, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x81, 0x98, 0x42, 0x22, 0x5c,
0xac, 0x65, 0x89, 0x39, 0xa5, 0xa9, 0x12, 0x4c, 0x60, 0x31, 0x08, 0xc7, 0x8a, 0xc9, 0x82, 0xd1,
0x89, 0xe7, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x4c, 0x62,
0x03, 0x3b, 0xd1, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x38, 0xe5, 0x24, 0x74, 0xaf, 0x00, 0x00,
0x00,
}

View File

@ -0,0 +1,70 @@
// Protocol Buffers for Go with Gadgets
//
// Copyright (c) 2017, The GoGo Authors. All rights reserved.
// http://github.com/gogo/protobuf
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
package mapdefaults;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.goproto_stringer_all) = false;
option (gogoproto.goproto_enum_prefix_all) = false;
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.equal_all) = true;
option (gogoproto.verbose_equal_all) = true;
option (gogoproto.stringer_all) = true;
option (gogoproto.gostring_all) = true;
option (gogoproto.description_all) = true;
option (gogoproto.testgen_all) = true;
option (gogoproto.populate_all) = true;
option (gogoproto.unmarshaler_all) = false;
option (gogoproto.marshaler_all) = false;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_enum_stringer_all) = false;
option (gogoproto.enum_stringer_all) = true;
option (gogoproto.unsafe_marshaler_all) = false;
option (gogoproto.unsafe_unmarshaler_all) = false;
message MapTest {
map<string, string> str_str = 1;
}
message FakeMap {
repeated FakeMapEntry entries = 1;
}
message FakeMapEntry {
string key = 1;
string value = 2;
string other = 3;
}

View File

@ -0,0 +1,180 @@
// Protocol Buffers for Go with Gadgets
//
// Copyright (c) 2017, The GoGo Authors. All rights reserved.
// http://github.com/gogo/protobuf
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package mapdefaults
import (
"testing"
"github.com/gogo/protobuf/proto"
)
func TestUnmarshalImplicitDefaultKeyValue1(t *testing.T) {
fm := &FakeMap{
Entries: []*FakeMapEntry{
&FakeMapEntry{
Key: "foo",
Value: "",
},
&FakeMapEntry{
Key: "",
Value: "bar",
},
&FakeMapEntry{
Key: "as",
Value: "df",
},
},
}
serializedMsg, err := proto.Marshal(fm)
if err != nil {
t.Fatalf("Failed to serialize msg: %s", err)
}
msg := MapTest{}
err = proto.Unmarshal(serializedMsg, &msg)
if err != nil {
t.Fatalf("Unexpected error: %s", err)
}
strStr := msg.StrStr
if len(strStr) != 3 {
t.Fatal("StrStr map should have 3 key/value pairs")
}
val, ok := strStr["foo"]
if !ok {
t.Fatal("\"foo\" not found in StrStr map.")
}
if val != "" {
t.Fatalf("Unexpected value for \"foo\": %s", val)
}
val, ok = strStr[""]
if !ok {
t.Fatal("\"\" not found in StrStr map.")
}
if val != "bar" {
t.Fatalf("Unexpected value for \"\": %s", val)
}
val, ok = strStr["as"]
if !ok {
t.Fatal("\"as\" not found in StrStr map.")
}
if val != "df" {
t.Fatalf("Unexpected value for \"as\": %s", val)
}
}
func TestUnmarshalImplicitDefaultKeyValue2(t *testing.T) {
fm := &FakeMap{
Entries: []*FakeMapEntry{
&FakeMapEntry{
Key: "",
Value: "",
},
},
}
serializedMsg, err := proto.Marshal(fm)
if err != nil {
t.Fatalf("Failed to serialize msg: %s", err)
}
// Sanity check
if string(serializedMsg) != "\n\x00" {
t.Fatal("Serialized bytes mismatched")
}
msg := MapTest{}
err = proto.Unmarshal(serializedMsg, &msg)
if err != nil {
t.Fatalf("Unexpected error: %s", err)
}
strStr := msg.StrStr
if len(strStr) != 1 {
t.Fatal("StrStr map should have 1 key/value pairs")
}
val, ok := strStr[""]
if !ok {
t.Fatal("\"\" not found in StrStr map.")
}
if val != "" {
t.Fatalf("Unexpected value for \"\": %s", val)
}
}
func TestUnmarshalIgnoreUnknownField(t *testing.T) {
fm := &FakeMap{
Entries: []*FakeMapEntry{
&FakeMapEntry{
Key: "key",
Value: "value",
Other: "other",
},
},
}
serializedMsg, err := proto.Marshal(fm)
if err != nil {
t.Fatalf("Failed to serialize msg: %s", err)
}
msg := &MapTest{}
err = proto.Unmarshal(serializedMsg, msg)
if err != nil {
var pb proto.Message = msg
_, ok := pb.(proto.Unmarshaler)
if !ok {
// non-codegen implementation returns error when extra tags are
// present.
return
}
t.Fatalf("Unexpected error: %s", err)
}
strStr := msg.StrStr
if len(strStr) != 1 {
t.Fatal("StrStr map should have 1 key/value pairs")
}
val, ok := strStr["key"]
if !ok {
t.Fatal("\"key\" not found in StrStr map.")
}
if val != "value" {
t.Fatalf("Unexpected value for \"value\": %s", val)
}
}