Lines Matching refs:testpb
14 testpb "google.golang.org/protobuf/internal/testprotos/test" packageName
21 optMsg := &testpb.TestAllTypes{
31 OptionalNestedMessage: &testpb.TestAllTypes_NestedMessage{A: proto.Int32(-32)},
32 OptionalNestedEnum: testpb.TestAllTypes_NEG.Enum(),
34 repMsg := &testpb.TestAllTypes{
44 …RepeatedNestedMessage: []*testpb.TestAllTypes_NestedMessage{{A: proto.Int32(-32)}, {A: proto.Int32…
45 …RepeatedNestedEnum: []testpb.TestAllTypes_NestedEnum{testpb.TestAllTypes_FOO, testpb.TestAllTyp…
47 mapMsg := &testpb.TestAllTypes{
57 …MapStringNestedMessage: map[string]*testpb.TestAllTypes_NestedMessage{"k1": {A: proto.Int32(-32)},…
58 …MapStringNestedEnum: map[string]testpb.TestAllTypes_NestedEnum{"k1": testpb.TestAllTypes_FOO, "…
65 &testpb.TestAllTypes{
66 OneofField: &testpb.TestAllTypes_OneofUint32{32},
68 &testpb.TestAllTypes{
69 OneofField: &testpb.TestAllTypes_OneofUint64{64},
71 &testpb.TestAllTypes{
72 OneofField: &testpb.TestAllTypes_OneofFloat{32.32},
74 &testpb.TestAllTypes{
75 OneofField: &testpb.TestAllTypes_OneofDouble{64.64},
77 &testpb.TestAllTypes{
78 OneofField: &testpb.TestAllTypes_OneofBool{true},
80 &testpb.TestAllTypes{
81 OneofField: &testpb.TestAllTypes_OneofString{"string"},
83 &testpb.TestAllTypes{
84 OneofField: &testpb.TestAllTypes_OneofBytes{[]byte("bytes")},
86 &testpb.TestAllTypes{
87 …OneofField: &testpb.TestAllTypes_OneofNestedMessage{&testpb.TestAllTypes_NestedMessage{A: proto.In…
89 &testpb.TestAllTypes{
90 OneofField: &testpb.TestAllTypes_OneofEnum{testpb.TestAllTypes_NEG},
93 m := new(testpb.TestAllExtensions)
94 proto.SetExtension(m, testpb.E_OptionalInt32, int32(-32))
95 proto.SetExtension(m, testpb.E_OptionalInt64, int64(-64))
96 proto.SetExtension(m, testpb.E_OptionalUint32, uint32(32))
97 proto.SetExtension(m, testpb.E_OptionalUint64, uint64(64))
98 proto.SetExtension(m, testpb.E_OptionalFloat, float32(32.32))
99 proto.SetExtension(m, testpb.E_OptionalDouble, float64(64.64))
100 proto.SetExtension(m, testpb.E_OptionalBool, bool(true))
101 proto.SetExtension(m, testpb.E_OptionalString, string("string"))
102 proto.SetExtension(m, testpb.E_OptionalBytes, []byte("bytes"))
103 …proto.SetExtension(m, testpb.E_OptionalNestedMessage, &testpb.TestAllExtensions_NestedMessage{A: p…
104 proto.SetExtension(m, testpb.E_OptionalNestedEnum, testpb.TestAllTypes_NEG)
108 m := new(testpb.TestAllExtensions)
109 proto.SetExtension(m, testpb.E_RepeatedInt32, []int32{-32, +32})
110 proto.SetExtension(m, testpb.E_RepeatedInt64, []int64{-64, +64})
111 proto.SetExtension(m, testpb.E_RepeatedUint32, []uint32{0, 32})
112 proto.SetExtension(m, testpb.E_RepeatedUint64, []uint64{0, 64})
113 proto.SetExtension(m, testpb.E_RepeatedFloat, []float32{-32.32, +32.32})
114 proto.SetExtension(m, testpb.E_RepeatedDouble, []float64{-64.64, +64.64})
115 proto.SetExtension(m, testpb.E_RepeatedBool, []bool{false, true})
116 proto.SetExtension(m, testpb.E_RepeatedString, []string{"hello", "goodbye"})
117 proto.SetExtension(m, testpb.E_RepeatedBytes, [][]byte{[]byte("hello"), []byte("goodbye")})
118 …proto.SetExtension(m, testpb.E_RepeatedNestedMessage, []*testpb.TestAllExtensions_NestedMessage{{A…
119 …proto.SetExtension(m, testpb.E_RepeatedNestedEnum, []testpb.TestAllTypes_NestedEnum{testpb.TestAll…