Home
last modified time | relevance | path

Searched refs:TestMap (Results 1 – 25 of 70) sorted by relevance

123

/external/protobuf/java/core/src/test/java/com/google/protobuf/
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.Builder usingAccessorsBuilder = TestMap.newBuilder(); in testSetMapValues()
80 TestMap usingAccessors = usingAccessorsBuilder.build(); in testSetMapValues()
[all …]
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 source, TestMap.Builder destination) { in copyMapValues()
88 private void assertMapValuesSet(TestMap message) { in assertMapValuesSet()
[all …]
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.EnumValue.BAZ) in setMapValuesUsingAccessors()
[all …]
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.EnumValue.BAR) in setMapValuesUsingAccessors()
[all …]
DTextFormatTest.java39 import map_test.MapTestProto.TestMap;
1177 TestMap message = in testMapTextFormat()
1178 TestMap.newBuilder() in testMapTextFormat()
1185 TestMap.Builder dest = TestMap.newBuilder(); in testMapTextFormat()
1190 TestMap.Builder dest = TestMap.newBuilder(); in testMapTextFormat()
1201 TestMap.Builder dest = TestMap.newBuilder(); in testMapShortForm()
1203 TestMap message = dest.build(); in testMapShortForm()
1212 TestMap.Builder dest = TestMap.newBuilder(); in testMapShortFormEmpty()
1214 TestMap message = dest.build(); in testMapShortFormEmpty()
1221 TestMap.Builder dest = TestMap.newBuilder(); in testMapShortFormTrailingComma()
[all …]
/external/guava/guava-tests/test/com/google/common/collect/
DForwardingConcurrentMapTest.java30 private static class TestMap extends ForwardingConcurrentMap<String, Integer> { class in ForwardingConcurrentMapTest
40 TestMap map = new TestMap(); in testPutIfAbsent()
49 TestMap map = new TestMap(); in testRemove()
59 TestMap map = new TestMap(); in testReplace()
68 TestMap map = new TestMap(); in testReplaceConditional()
DSynchronizedMapTest.java41 TestMap<K, V> inner = new TestMap<>(new HashMap<K, V>(), mutex); in create()
46 static class TestMap<K, V> extends ForwardingMap<K, V> implements Serializable { class in SynchronizedMapTest
50 public TestMap(Map<K, V> delegate, Object mutex) { in TestMap() method in SynchronizedMapTest.TestMap
/external/guava/android/guava-tests/test/com/google/common/collect/
DForwardingConcurrentMapTest.java30 private static class TestMap extends ForwardingConcurrentMap<String, Integer> { class in ForwardingConcurrentMapTest
40 TestMap map = new TestMap(); in testPutIfAbsent()
49 TestMap map = new TestMap(); in testRemove()
59 TestMap map = new TestMap(); in testReplace()
68 TestMap map = new TestMap(); in testReplaceConditional()
DSynchronizedMapTest.java41 TestMap<K, V> inner = new TestMap<>(new HashMap<K, V>(), mutex); in create()
46 static class TestMap<K, V> extends ForwardingMap<K, V> implements Serializable { class in SynchronizedMapTest
50 public TestMap(Map<K, V> delegate, Object mutex) { in TestMap() method in SynchronizedMapTest.TestMap
/external/protobuf/src/google/protobuf/
Dmap_test_util.h44 static void SetMapFields(unittest::TestMap* message);
50 static void SetMapFieldsInitialized(unittest::TestMap* message);
54 static void ModifyMapFields(unittest::TestMap* message);
58 static void ExpectMapFieldsSet(const unittest::TestMap& message);
66 static void ExpectMapFieldsSetInitialized(const unittest::TestMap& message);
70 static void ExpectMapFieldsModified(const unittest::TestMap& message);
73 static void ExpectClear(const unittest::TestMap& message);
76 static void ExpectMapsSize(const unittest::TestMap& message, int size);
80 const unittest::TestMap& message, int index);
84 unittest::TestMap* message);
Dmap_test.cc88 using unittest::TestMap;
970 TestMap message; in TEST_F()
971 MapReflectionTester reflection_tester(unittest::TestMap::descriptor()); in TEST_F()
1006 TestMap message; in TEST_F()
1193 TestMap message; in TEST_F()
1686 TestMap m0, m1, m2; in TEST_F()
1795 factory.GetPrototype(unittest::TestMap::descriptor())->New()); in TEST_F()
1798 unittest::TestMap::descriptor()->FindFieldByName("map_int32_int32"); in TEST_F()
1816 unittest::TestMap message; in TEST_F()
1838 unittest::TestMap message; in TEST()
[all …]
/external/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/
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.MapInt32ForeignMessageFieldNumber, WireFormat.WireType.LengthDelimited); in MapWithOnlyKey_MessageValue()
301 var parsed = TestMap.Parser.ParseFrom(memoryStream.ToArray()); in MapWithOnlyKey_MessageValue()
[all …]
/external/protobuf/csharp/src/Google.Protobuf.Test/
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.MapInt32ForeignMessageFieldNumber, WireFormat.WireType.LengthDelimited); in MapWithOnlyKey_MessageValue()
301 var parsed = TestMap.Parser.ParseFrom(memoryStream.ToArray()); in MapWithOnlyKey_MessageValue()
[all …]
/external/google-breakpad/src/processor/
Dstatic_map_unittest.cc43 typedef google_breakpad::StaticMap< KeyType, ValueType > TestMap; typedef
94 TestMap test_map;
99 test_map = TestMap(data); in TEST_F()
111 test_map = TestMap(data); in TEST_F()
116 test_map = TestMap(data); in TEST_F()
134 test_map = TestMap(data); in TEST_F()
147 test_map[testcase] = TestMap(map_data[testcase]); in SetUp()
154 test_map[testcase] = TestMap(map_data[testcase]); in SetUp()
162 test_map[testcase] = TestMap(map_data[testcase]); in SetUp()
170 test_map[testcase] = TestMap(map_data[testcase]); in SetUp()
[all …]
Drange_map_unittest.cc71 typedef RangeMap< AddressType, linked_ptr<CountedObject> > TestMap; typedef
105 static bool StoreTest(TestMap *range_map, const RangeTest *range_test) { in StoreTest()
129 static bool RetrieveTest(TestMap *range_map, const RangeTest *range_test) { in RetrieveTest()
273 static bool RetrieveIndexTest(TestMap *range_map, int set) { in RetrieveIndexTest()
338 scoped_ptr<TestMap> range_map(new TestMap()); in RetriveAtIndexTest2()
464 scoped_ptr<TestMap> range_map(new TestMap()); in RunTests()
Dstatic_contained_range_map_unittest.cc46 typedef google_breakpad::StaticContainedRangeMap<unsigned int, int> TestMap; typedef
233 test_map_ = TestMap(serialized_data_.get()); in SetUp()
242 scoped_ptr<TestMap> test_map(new TestMap(serialized_data.get())); in TEST_F()
262 scoped_ptr<TestMap> test_map(new TestMap(serialized_data.get())); in TEST_F()
Dstatic_range_map_unittest.cc47 typedef google_breakpad::StaticRangeMap< AddressType, EntryType > TestMap; typedef
183 void RetrieveTest(TestMap* range_map, const RangeTest* range_test);
191 void RetrieveIndexTest(const TestMap* range_map, int set);
208 void TestStaticRangeMap::RetrieveTest(TestMap* range_map, in RetrieveTest()
312 void TestStaticRangeMap::RetrieveIndexTest(const TestMap* range_map, int set) { in RetrieveIndexTest()
374 scoped_ptr<TestMap> static_range_map(new TestMap(memaddr.get())); in RunTestCase()
Drange_map_truncate_upper_unittest.cc68 typedef RangeMap<AddressType, linked_ptr<CountedObject>> TestMap; typedef
72 TestMap range_map; in TEST()
87 TestMap range_map; in TEST()
124 TestMap range_map; in TEST()
160 TestMap range_map; in TEST()
193 TestMap range_map; in TEST()
229 TestMap range_map; in TEST()
274 TestMap range_map; in TEST()
322 TestMap range_map; in TEST()
Drange_map_truncate_lower_unittest.cc63 typedef RangeMap<AddressType, linked_ptr<CountedObject>> TestMap; typedef
67 TestMap range_map; in TEST()
82 TestMap range_map; in TEST()
119 TestMap range_map; in TEST()
155 TestMap range_map; in TEST()
187 TestMap range_map; in TEST()
222 TestMap range_map; in TEST()
267 TestMap range_map; in TEST()
314 TestMap range_map; in TEST()
/external/google-breakpad/src/common/
Dsimple_string_dictionary_unittest.cc36 typedef NonAllocatingMap<5, 9, 15> TestMap; in TEST() typedef
37 TestMap map; in TEST()
39 const TestMap::Entry* entry = TestMap::Iterator(map).Next(); in TEST()
44 entry = TestMap::Iterator(map).Next(); in TEST()
254 typedef NonAllocatingMap<4, 5, 7> TestMap; in TEST() typedef
255 TestMap map; in TEST()
272 TestMap deserialized(serialized_copy, size); in TEST()
/external/protobuf/csharp/src/Google.Protobuf.Test/Reflection/
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(mapMes… 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… in SetValue_MapFields()
178 …dCastException>(() => fields[TestAllTypes.SingleBoolFieldNumber].Accessor.GetValue(new TestMap())); in GetValue_IncorrectType()
/external/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/Reflection/
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(mapMes… 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… in SetValue_MapFields()
178 …dCastException>(() => fields[TestAllTypes.SingleBoolFieldNumber].Accessor.GetValue(new TestMap())); in GetValue_IncorrectType()
/external/protobuf/java/util/src/test/java/com/google/protobuf/util/
DJsonFormatTest.java61 import com.google.protobuf.util.proto.JsonTestProto.TestMap;
242 TestMap.Builder mapBuilder = TestMap.newBuilder(); in testUnknownEnumValues()
245 TestMap mapMessage = mapBuilder.build(); in testUnknownEnumValues()
536 TestMap.Builder builder = TestMap.newBuilder(); in testMapFields()
566 TestMap message = builder.build(); in testMapFields()
661 builder = TestMap.newBuilder(); in testMapFields()
674 TestMap.Builder builder = TestMap.newBuilder(); in testMapNullValueIsRejected()
687 TestMap.Builder builder = TestMap.newBuilder(); in testMapNullValueIsRejected()
702 TestMap.Builder builder = TestMap.newBuilder(); in testMapEnumNullValueIsIgnored()
705 TestMap map = builder.build(); in testMapEnumNullValueIsIgnored()
[all …]
/external/protobuf/csharp/src/Google.Protobuf.Test/TestProtos/
DMapUnittestProto3.cs154 …ypeInfo(typeof(global::Google.Protobuf.TestProtos.TestMap), global::Google.Protobuf.TestProtos.Tes… in MapUnittestProto3Reflection()
179 public sealed partial class TestMap : pb::IMessage<TestMap> { class
180 …private static readonly pb::MessageParser<TestMap> _parser = new pb::MessageParser<TestMap>(() => …
183 public static pb::MessageParser<TestMap> Parser { get { return _parser; } }
196 public TestMap() { in TestMap() method in Google.Protobuf.TestProtos.TestMap
203 public TestMap(TestMap other) : this() { in TestMap() method in Google.Protobuf.TestProtos.TestMap
225 public TestMap Clone() { in Clone()
226 return new TestMap(this); in Clone()
401 return Equals(other as TestMap); in Equals()
405 public bool Equals(TestMap other) { in Equals()
[all …]
/external/protobuf/python/google/protobuf/internal/
Dmessage_test.py1674 msg = map_unittest_pb2.TestMap()
1724 msg = map_unittest_pb2.TestMap()
1747 msg = map_unittest_pb2.TestMap()
1781 msg2 = map_unittest_pb2.TestMap()
1806 msg = map_unittest_pb2.TestMap()
1814 msg = map_unittest_pb2.TestMap()
1830 msg = map_unittest_pb2.TestMap()
1857 msg2 = map_unittest_pb2.TestMap()
1870 msg = map_unittest_pb2.TestMap()
1879 msg2 = map_unittest_pb2.TestMap()
[all …]

123