Home
last modified time | relevance | path

Searched refs:TestMap (Results 1 - 25 of 28) sorted by relevance

12

/third_party/protobuf/java/core/src/test/java/com/google/protobuf/
H A DMapForProto2LiteTest.java34 import map_lite_test.MapForProto2TestProto.TestMap;
35 import map_lite_test.MapForProto2TestProto.TestMap.MessageValue;
49 private void setMapValues(TestMap.Builder builder) { in setMapValues()
60 .putInt32ToEnumField(1, TestMap.EnumValue.FOO) in setMapValues()
61 .putInt32ToEnumField(2, TestMap.EnumValue.BAR) in setMapValues()
62 .putInt32ToEnumField(3, TestMap.EnumValue.BAZ) in setMapValues()
72 TestMap.Builder mapBuilder = TestMap.newBuilder(); in testSetMapValues()
74 TestMap map = mapBuilder.build(); in testSetMapValues()
78 private void copyMapValues(TestMap sourc
[all...]
H A DMapLiteTest.java36 import map_lite_test.MapTestProto.TestMap;
37 import map_lite_test.MapTestProto.TestMap.MessageValue;
50 private void setMapValues(TestMap.Builder builder) { in setMapValues()
61 .putInt32ToEnumField(1, TestMap.EnumValue.FOO) in setMapValues()
62 .putInt32ToEnumField(2, TestMap.EnumValue.BAR) in setMapValues()
63 .putInt32ToEnumField(3, TestMap.EnumValue.BAZ) in setMapValues()
73 TestMap.Builder usingMutableMapBuilder = TestMap.newBuilder(); in testSetMapValues()
75 TestMap usingMutableMap = usingMutableMapBuilder.build(); in testSetMapValues()
78 TestMap in testSetMapValues()
[all...]
H A DMapTest.java42 import map_test.MapTestProto.TestMap;
43 import map_test.MapTestProto.TestMap.MessageValue;
58 private void setMapValuesUsingMutableMap(TestMap.Builder builder) { in setMapValuesUsingMutableMap()
71 builder.getMutableInt32ToEnumField().put(1, TestMap.EnumValue.FOO); in setMapValuesUsingMutableMap()
72 builder.getMutableInt32ToEnumField().put(2, TestMap.EnumValue.BAR); in setMapValuesUsingMutableMap()
73 builder.getMutableInt32ToEnumField().put(3, TestMap.EnumValue.BAZ); in setMapValuesUsingMutableMap()
87 private void setMapValuesUsingAccessors(TestMap.Builder builder) { in setMapValuesUsingAccessors()
98 .putInt32ToEnumField(1, TestMap.EnumValue.FOO) in setMapValuesUsingAccessors()
99 .putInt32ToEnumField(2, TestMap.EnumValue.BAR) in setMapValuesUsingAccessors()
100 .putInt32ToEnumField(3, TestMap in setMapValuesUsingAccessors()
[all...]
H A DMapForProto2Test.java37 import map_test.MapForProto2TestProto.TestMap;
38 import map_test.MapForProto2TestProto.TestMap.MessageValue;
39 import map_test.MapForProto2TestProto.TestMap.MessageWithRequiredFields;
55 private void setMapValuesUsingMutableMap(TestMap.Builder builder) { in setMapValuesUsingMutableMap()
68 builder.getMutableInt32ToEnumField().put(1, TestMap.EnumValue.FOO); in setMapValuesUsingMutableMap()
69 builder.getMutableInt32ToEnumField().put(2, TestMap.EnumValue.BAR); in setMapValuesUsingMutableMap()
70 builder.getMutableInt32ToEnumField().put(3, TestMap.EnumValue.BAZ); in setMapValuesUsingMutableMap()
84 private void setMapValuesUsingAccessors(TestMap.Builder builder) { in setMapValuesUsingAccessors()
95 .putInt32ToEnumField(1, TestMap.EnumValue.FOO) in setMapValuesUsingAccessors()
96 .putInt32ToEnumField(2, TestMap in setMapValuesUsingAccessors()
[all...]
H A DTextFormatTest.java46 import map_test.MapTestProto.TestMap;
1388 TestMap message = in testMapTextFormat()
1389 TestMap.newBuilder() in testMapTextFormat()
1396 TestMap.Builder dest = TestMap.newBuilder(); in testMapTextFormat()
1401 TestMap.Builder dest = TestMap.newBuilder(); in testMapTextFormat()
1421 TestMap msg = TextFormat.parse(input, TestMap.class); in testMapDuplicateKeys()
1423 TestMap msg in testMapDuplicateKeys()
[all...]
H A DWireFormatLiteTest.java39 import map_test.MapTestProto.TestMap;
608 assertInvalidWireFormat(TestMap.getDefaultInstance(), data); in testParserRejectInvalidTag()
659 assertAccepted(TestMap.getDefaultInstance(), data); in testUnmatchedWireType()
660 assertAccepted(MapForProto2TestProto.TestMap.getDefaultInstance(), data); in testUnmatchedWireType()
919 TestMap message = TestMap.newBuilder().putInt32ToEnumFieldValue(1, 4321).build(); in testProto2UnknownEnumValuesInMapField()
920 MapForProto2TestProto.TestMap parsed = in testProto2UnknownEnumValuesInMapField()
921 MapForProto2TestProto.TestMap.parseFrom(message.toByteArray()); in testProto2UnknownEnumValuesInMapField()
924 TestMap actual = TestMap in testProto2UnknownEnumValuesInMapField()
[all...]
/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/
H A DGeneratedMessageTest.cs211 var message = new TestMap in RoundTrip_Maps()
233 TestMap parsed = TestMap.Parser.ParseFrom(bytes); in RoundTrip_Maps()
240 var message = new TestMap in MapWithEmptyEntry()
248 var parsed = TestMap.Parser.ParseFrom(bytes); in MapWithEmptyEntry()
259 output.WriteTag(TestMap.MapInt32ForeignMessageFieldNumber, WireFormat.WireType.LengthDelimited); in MapWithOnlyValue()
267 var parsed = TestMap.Parser.ParseFrom(memoryStream.ToArray()); in MapWithOnlyValue()
277 output.WriteTag(TestMap.MapInt32DoubleFieldNumber, WireFormat.WireType.LengthDelimited); in MapWithOnlyKey_PrimitiveValue()
284 var parsed = TestMap.Parser.ParseFrom(memoryStream.ToArray()); in MapWithOnlyKey_PrimitiveValue()
294 output.WriteTag(TestMap in MapWithOnlyKey_MessageValue()
[all...]
H A DJsonParserTest.cs56 AssertRoundtrip(new TestMap { MapStringString = { { "with spaces", "bar" }, { "a", "b" } } }); in Maps()
57 AssertRoundtrip(new TestMap { MapInt32Int32 = { { 0, 1 }, { 2, 3 } } }); in Maps()
58 AssertRoundtrip(new TestMap { MapBoolBool = { { false, true }, { true, false } } }); in Maps()
71 Assert.Throws<InvalidProtocolBufferException>(() => JsonParser.Default.Parse<TestMap>(json)); in IntegerMapKeysAreStrict()
214 Assert.Throws<InvalidProtocolBufferException>(() => TestMap.Parser.ParseJson(json)); in MapField_NullValueProhibited()
221 Assert.AreEqual(new TestMap(), TestMap.Parser.ParseJson(json)); in MapField_NullOverallValueAllowed()
/third_party/protobuf/csharp/src/Google.Protobuf.Test/
H A DGeneratedMessageTest.cs214 var message = new TestMap in RoundTrip_Maps()
237 MessageParsingHelpers.AssertRoundtrip(TestMap.Parser, message); in RoundTrip_Maps()
243 var message = new TestMap in MapWithEmptyEntry()
254 TestMap.Parser, in MapWithEmptyEntry()
269 output.WriteTag(TestMap.MapInt32ForeignMessageFieldNumber, WireFormat.WireType.LengthDelimited); in MapWithOnlyValue()
278 TestMap.Parser, in MapWithOnlyValue()
292 output.WriteTag(TestMap.MapInt32DoubleFieldNumber, WireFormat.WireType.LengthDelimited); in MapWithOnlyKey_PrimitiveValue()
300 TestMap.Parser, in MapWithOnlyKey_PrimitiveValue()
314 output.WriteTag(TestMap.MapInt32ForeignMessageFieldNumber, WireFormat.WireType.LengthDelimited); in MapWithOnlyKey_MessageValue()
322 TestMap in MapWithOnlyKey_MessageValue()
[all...]
H A DJsonFormatterTest.cs60 AssertJson("{ }", formatter.Format(new TestMap())); in DefaultValues_WhenOmitted()
210 JsonFormatter.Default.Format(new TestMap { MapStringString = { { "with spaces", "bar" }, { "a", "b" } } })); in MapField_StringString()
218 JsonFormatter.Default.Format(new TestMap { MapInt32Int32 = { { 0, 1 }, { 2, 3 } } })); in MapField_Int32Int32()
226 JsonFormatter.Default.Format(new TestMap { MapBoolBool = { { false, true }, { true, false } } })); in MapField_BoolBool()
280 var message = new TestMap { MapInt32Enum = { { 1, MapEnum.Foo }, { 2, (MapEnum) 100 }, { 3, MapEnum.Bar } } }; in UnknownEnumValueNumeric_MapField()
H A DJsonParserTest.cs58 AssertRoundtrip(new TestMap { MapStringString = { { "with spaces", "bar" }, { "a", "b" } } }); in Maps()
59 AssertRoundtrip(new TestMap { MapInt32Int32 = { { 0, 1 }, { 2, 3 } } }); in Maps()
60 AssertRoundtrip(new TestMap { MapBoolBool = { { false, true }, { true, false } } }); in Maps()
73 Assert.Throws<InvalidProtocolBufferException>(() => JsonParser.Default.Parse<TestMap>(json)); in IntegerMapKeysAreStrict()
216 Assert.Throws<InvalidProtocolBufferException>(() => TestMap.Parser.ParseJson(json)); in MapField_NullValueProhibited()
223 Assert.AreEqual(new TestMap(), TestMap.Parser.ParseJson(json)); in MapField_NullOverallValueAllowed()
/third_party/protobuf/src/google/protobuf/
H A Dmap_test.cc90 using unittest::TestMap;
974 TestMap message; in TEST_F()
975 MapReflectionTester reflection_tester(unittest::TestMap::descriptor()); in TEST_F()
1112 TestMap message; in TEST_F()
1299 TestMap message; in TEST_F()
1792 TestMap m0, m1, m2; in TEST_F()
1901 factory.GetPrototype(unittest::TestMap::descriptor())->New()); in TEST_F()
1904 unittest::TestMap::descriptor()->FindFieldByName("map_int32_int32"); in TEST_F()
1922 unittest::TestMap message; in TEST_F()
1954 unittest::TestMap messag in TEST()
[all...]
/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/Reflection/
H A DFieldAccessTest.cs81 var mapMessage = new TestMap { MapStringString = { { "key1", "value1" }, { "key2", "value2" } } }; in GetValue()
82 fields = TestMap.Descriptor.Fields; in GetValue()
83 var dictionary = (IDictionary) fields[TestMap.MapStringStringFieldNumber].Accessor.GetValue(mapMessage); in GetValue()
115 var mapMessage = new TestMap { MapStringString = { { "key1", "value1" }, { "key2", "value2" } } }; in Clear()
116 fields = TestMap.Descriptor.Fields; in Clear()
117 fields[TestMap.MapStringStringFieldNumber].Accessor.Clear(mapMessage); in Clear()
160 IMessage message = new TestMap(); in SetValue_MapFields()
162 Assert.Throws<InvalidOperationException>(() => fields[TestMap.MapStringStringFieldNumber].Accessor.SetValue(message, new Dictionary<string, string>())); in SetValue_MapFields()
178 Assert.Throws<InvalidCastException>(() => fields[TestAllTypes.SingleBoolFieldNumber].Accessor.GetValue(new TestMap())); in GetValue_IncorrectType()
/third_party/protobuf/csharp/src/Google.Protobuf.Test/Reflection/
H A DFieldAccessTest.cs85 var mapMessage = new TestMap { MapStringString = { { "key1", "value1" }, { "key2", "value2" } } }; in GetValue()
86 fields = TestMap.Descriptor.Fields; in GetValue()
87 var dictionary = (IDictionary) fields[TestMap.MapStringStringFieldNumber].Accessor.GetValue(mapMessage); in GetValue()
97 Assert.Throws<InvalidCastException>(() => fields[TestProtos.TestAllTypes.SingleBoolFieldNumber].Accessor.GetValue(new TestMap())); in GetValue_IncorrectType()
246 IMessage message = new TestMap(); in SetValue_MapFields()
248 Assert.Throws<InvalidOperationException>(() => fields[TestMap.MapStringStringFieldNumber].Accessor.SetValue(message, new Dictionary<string, string>())); in SetValue_MapFields()
306 var mapMessage = new TestMap { MapStringString = { { "key1", "value1" }, { "key2", "value2" } } }; in Clear()
307 fields = TestMap.Descriptor.Fields; in Clear()
308 fields[TestMap.MapStringStringFieldNumber].Accessor.Clear(mapMessage); in Clear()
419 fields = TestMap in HasPresence()
[all...]
/third_party/protobuf/python/google/protobuf/internal/
H A Dmessage_test.py1767 msg = map_unittest_pb2.TestMap()
1817 msg = map_unittest_pb2.TestMap()
1840 msg = map_unittest_pb2.TestMap()
1874 msg2 = map_unittest_pb2.TestMap()
1899 msg = map_unittest_pb2.TestMap()
1907 msg = map_unittest_pb2.TestMap()
1923 msg = map_unittest_pb2.TestMap()
1950 msg2 = map_unittest_pb2.TestMap()
1963 msg = map_unittest_pb2.TestMap()
1972 msg2 = map_unittest_pb2.TestMap()
[all...]
H A Dunknown_fields_test.py153 msg = map_unittest_pb2.TestMap()
/third_party/protobuf/csharp/src/Google.Protobuf.Test.TestProtos/
H A DMapUnittestProto3.cs154 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestMap), global::Google.Protobuf.TestProtos.TestMap.Parser, new[]{ "MapInt32Int32", "MapInt64Int64", "MapUint32Uint32", "MapUint64Uint64", "MapSint32Sint32", "MapSint64Sint64", "MapFixed32Fixed32", "MapFixed64Fixed64", "MapSfixed32Sfixed32", "MapSfixed64Sfixed64", "MapInt32Float", "MapInt32Double", "MapBoolBool", "MapStringString", "MapInt32Bytes", "MapInt32Enum", "MapInt32ForeignMessage" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, }), in MapUnittestProto3Reflection()
155 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestMapSubmessage), global::Google.Protobuf.TestProtos.TestMapSubmessage.Parser, new[]{ "TestMap" }, null, null, null, null), in MapUnittestProto3Reflection()
179 public sealed partial class TestMap : pb::IMessage<TestMap> class
184 private static readonly pb::MessageParser<TestMap> _parser = new pb::MessageParser<TestMap>(() => new TestMap());
187 public static pb::MessageParser<TestMap> Parser { get { return _parser; } }
200 public TestMap() { in TestMap() method in Google.Protobuf.TestProtos.TestMap
207 public TestMap(TestMap other) : this() { TestMap() method in Google.Protobuf.TestProtos.TestMap
782 public global::Google.Protobuf.TestProtos.TestMap TestMap { global() property in Google.Protobuf.TestProtos.TestMapSubmessage
[all...]
/third_party/protobuf/java/util/src/test/java/com/google/protobuf/util/
H A DJsonFormatTest.java62 import com.google.protobuf.util.proto.JsonTestProto.TestMap;
253 TestMap.Builder mapBuilder = TestMap.newBuilder(); in testUnknownEnumValues()
256 TestMap mapMessage = mapBuilder.build(); in testUnknownEnumValues()
547 TestMap.Builder builder = TestMap.newBuilder(); in testMapFields()
577 TestMap message = builder.build(); in testMapFields()
672 builder = TestMap.newBuilder(); in testMapFields()
685 TestMap.Builder builder = TestMap in testMapNullValueIsRejected()
[all...]
/third_party/protobuf/objectivec/Tests/
H A DGPBTestUtilities.h35 @class TestMap;
69 - (void)setAllMapFields:(TestMap *)message numEntries:(uint32_t)count;
/third_party/protobuf/src/google/protobuf/util/
H A Dmessage_differencer_unittest.cc153 unittest::TestMap msg1; in TEST()
154 unittest::TestMap msg2; in TEST()
156 MapReflectionTester tester(unittest::TestMap::descriptor()); in TEST()
2410 unittest::TestMap map_proto1_;
2411 unittest::TestMap map_proto2_;
3236 unittest::TestMap map_reflection1; in TEST_F()
3243 unittest::TestMap map_reflection2 = map_reflection1; in TEST_F()
3252 unittest::TestMap map1; in TEST_F()
3253 unittest::TestMap map2; in TEST_F()
3274 unittest::TestMap map in TEST_F()
[all...]
H A Djson_util_test.cc56 using proto3::TestMap;
271 TestMap message; in TEST_F()
276 TestMap other; in TEST_F()
H A Dtype_resolver_util_test.cc334 TEST_F(DescriptorPoolTypeResolverTest, TestMap) { in TEST_F()
338 ->ResolveMessageType(GetTypeUrl<protobuf_unittest::TestMap>(), &type) in TEST_F()
344 GetTypeUrl("protobuf_unittest.TestMap.MapInt32Int32Entry"))); in TEST_F()
349 GetTypeUrl("protobuf_unittest.TestMap.MapInt32Int32Entry"), &type) in TEST_F()
/third_party/protobuf/src/google/protobuf/stubs/
H A Dstringpiece_unittest.cc111 typedef std::map<StringPiece, int> TestMap; in TEST() typedef
112 TestMap map; in TEST()
119 TestMap::const_iterator iter = map.begin(); in TEST()
128 TestMap::iterator new_iter = map.find("zot"); in TEST()
/third_party/skia/third_party/externals/abseil-cpp/absl/strings/
H A Dstring_view_test.cc162 typedef std::map<absl::string_view, int> TestMap; in TEST() typedef
163 TestMap map; in TEST()
170 TestMap::const_iterator iter = map.begin(); in TEST()
179 TestMap::iterator new_iter = map.find("zot"); in TEST()
/third_party/protobuf/java/lite/src/test/java/com/google/protobuf/
H A DLiteTest.java51 import map_lite_test.MapTestProto.TestMap;
52 import map_lite_test.MapTestProto.TestMap.MessageValue;
1496 TestMap message1 = in testToStringMapFields()
1497 TestMap.newBuilder() in testToStringMapFields()
1512 TestMap message2 = in testToStringMapFields()
1513 TestMap.newBuilder() in testToStringMapFields()

Completed in 35 milliseconds

12