Home
last modified time | relevance | path

Searched refs:HasField (Results 1 – 25 of 41) sorted by relevance

12

/third_party/protobuf/src/google/protobuf/util/
Dtype_resolver_util_test.cc81 bool HasField(const Type& type, Field::Cardinality cardinality, in HasField() function in google::protobuf::util::__anoned2148d60111::DescriptorPoolTypeResolverTest
181 EXPECT_TRUE(HasField(type, Field::CARDINALITY_OPTIONAL, Field::TYPE_INT32, in TEST_F()
183 EXPECT_TRUE(HasField(type, Field::CARDINALITY_OPTIONAL, Field::TYPE_INT64, in TEST_F()
185 EXPECT_TRUE(HasField(type, Field::CARDINALITY_OPTIONAL, Field::TYPE_UINT32, in TEST_F()
187 EXPECT_TRUE(HasField(type, Field::CARDINALITY_OPTIONAL, Field::TYPE_UINT64, in TEST_F()
189 EXPECT_TRUE(HasField(type, Field::CARDINALITY_OPTIONAL, Field::TYPE_SINT32, in TEST_F()
191 EXPECT_TRUE(HasField(type, Field::CARDINALITY_OPTIONAL, Field::TYPE_SINT64, in TEST_F()
193 EXPECT_TRUE(HasField(type, Field::CARDINALITY_OPTIONAL, Field::TYPE_FIXED32, in TEST_F()
195 EXPECT_TRUE(HasField(type, Field::CARDINALITY_OPTIONAL, Field::TYPE_FIXED64, in TEST_F()
197 EXPECT_TRUE(HasField(type, Field::CARDINALITY_OPTIONAL, Field::TYPE_SFIXED32, in TEST_F()
[all …]
Dfield_mask_util.cc485 if (source_reflection->HasField(source, field)) { \ in MergeMessage()
507 if (source_reflection->HasField(source, field)) { in MergeMessage()
604 if (reflection->HasField(*message, field)) { in TrimMessage()
612 if (!child->children.empty() && reflection->HasField(*message, field)) { in TrimMessage()
/third_party/protobuf/src/google/protobuf/
Dtest_util.h365 EXPECT_TRUE(reflection->HasField( in ExpectOneofSetViaReflection()
368 reflection->HasField(message, descriptor->FindFieldByName("bar_cord"))); in ExpectOneofSetViaReflection()
370 reflection->HasField(message, descriptor->FindFieldByName("baz_int"))); in ExpectOneofSetViaReflection()
372 reflection->HasField(message, descriptor->FindFieldByName("baz_string"))); in ExpectOneofSetViaReflection()
447 EXPECT_TRUE(reflection->HasField(message, F("optional_int32"))); in ExpectAllFieldsSetViaReflection1()
448 EXPECT_TRUE(reflection->HasField(message, F("optional_int64"))); in ExpectAllFieldsSetViaReflection1()
449 EXPECT_TRUE(reflection->HasField(message, F("optional_uint32"))); in ExpectAllFieldsSetViaReflection1()
450 EXPECT_TRUE(reflection->HasField(message, F("optional_uint64"))); in ExpectAllFieldsSetViaReflection1()
451 EXPECT_TRUE(reflection->HasField(message, F("optional_sint32"))); in ExpectAllFieldsSetViaReflection1()
452 EXPECT_TRUE(reflection->HasField(message, F("optional_sint64"))); in ExpectAllFieldsSetViaReflection1()
[all …]
Dno_field_presence_test.cc290 EXPECT_EQ(false, r->HasField(message, field)); in TEST()
298 r->HasField( in TEST()
312 EXPECT_EQ(true, r->HasField(message, field)); in TEST()
324 EXPECT_EQ(false, r->HasField(message, field_int32)); in TEST()
325 EXPECT_EQ(false, r->HasField(message, field_double)); in TEST()
326 EXPECT_EQ(false, r->HasField(message, field_string)); in TEST()
329 EXPECT_EQ(true, r->HasField(message, field_int32)); in TEST()
331 EXPECT_EQ(false, r->HasField(message, field_int32)); in TEST()
334 EXPECT_EQ(true, r->HasField(message, field_double)); in TEST()
336 EXPECT_EQ(false, r->HasField(message, field_double)); in TEST()
[all …]
Ddynamic_message_unittest.cc305 EXPECT_EQ(false, refl->HasField(*message, optional_int32)); in TEST_F()
307 EXPECT_EQ(true, refl->HasField(*message, optional_int32)); in TEST_F()
309 EXPECT_EQ(false, refl->HasField(*message, optional_int32)); in TEST_F()
311 EXPECT_EQ(false, refl->HasField(*message, optional_msg)); in TEST_F()
313 EXPECT_EQ(true, refl->HasField(*message, optional_msg)); in TEST_F()
315 EXPECT_EQ(false, refl->HasField(*message, optional_msg)); in TEST_F()
318 EXPECT_EQ(false, refl->HasField(*proto3_prototype_, optional_msg)); in TEST_F()
Dproto3_arena_unittest.cc263 EXPECT_FALSE(r->HasField(msg, f)); in TEST()
270 EXPECT_TRUE(r->HasField(msg, f)); in TEST()
280 EXPECT_FALSE(r->HasField(msg, f)); in TEST()
286 EXPECT_TRUE(r->HasField(msg, f)); in TEST()
291 EXPECT_FALSE(r->HasField(msg, f)); in TEST()
Dreflection_ops.cc203 if (field->is_required() && !reflection->HasField(message, field)) { in IsInitialized()
237 } else if (reflection->HasField(message, field)) { in IsInitialized()
262 if (!reflection->HasField(message, descriptor->field(i))) { in IsInitialized()
395 if (!reflection->HasField(message, descriptor->field(i))) { in FindInitializationErrors()
Dgenerated_message_reflection.cc735 bool Reflection::HasField(const Message& message, in HasField() function in google::protobuf::Reflection
737 USAGE_CHECK_MESSAGE_TYPE(HasField); in HasField()
738 USAGE_CHECK_SINGULAR(HasField); in HasField()
1808 return HasField(message, field) ? field : nullptr; in GetOneofFieldDescriptor()
2078 return HasField(message, oneof_descriptor->field(0)); in HasOneof()
/third_party/protobuf/python/compatibility_tests/v2.5.0/tests/google/protobuf/internal/
Dtest_util.py369 test_case.assertTrue(message.HasField('optional_int32'))
370 test_case.assertTrue(message.HasField('optional_int64'))
371 test_case.assertTrue(message.HasField('optional_uint32'))
372 test_case.assertTrue(message.HasField('optional_uint64'))
373 test_case.assertTrue(message.HasField('optional_sint32'))
374 test_case.assertTrue(message.HasField('optional_sint64'))
375 test_case.assertTrue(message.HasField('optional_fixed32'))
376 test_case.assertTrue(message.HasField('optional_fixed64'))
377 test_case.assertTrue(message.HasField('optional_sfixed32'))
378 test_case.assertTrue(message.HasField('optional_sfixed64'))
[all …]
Dtext_format_test.py399 self.assertTrue(message.HasField('optionalgroup'))
406 self.assertTrue(message.HasField('optionalgroup'))
/third_party/protobuf/python/google/protobuf/internal/
Dtest_util.py410 test_case.assertTrue(message.HasField('optional_int32'))
411 test_case.assertTrue(message.HasField('optional_int64'))
412 test_case.assertTrue(message.HasField('optional_uint32'))
413 test_case.assertTrue(message.HasField('optional_uint64'))
414 test_case.assertTrue(message.HasField('optional_sint32'))
415 test_case.assertTrue(message.HasField('optional_sint64'))
416 test_case.assertTrue(message.HasField('optional_fixed32'))
417 test_case.assertTrue(message.HasField('optional_fixed64'))
418 test_case.assertTrue(message.HasField('optional_sfixed32'))
419 test_case.assertTrue(message.HasField('optional_sfixed64'))
[all …]
Dmessage_test.py801 self.assertTrue(m.HasField('payload'))
877 self.assertFalse(m1.HasField('optional_nested_message'))
880 self.assertFalse(m1.HasField('optional_nested_message'))
889 self.assertFalse(msg.HasField(attribute))
899 self.assertFalse(m.HasField('oneof_field'))
900 self.assertFalse(m.HasField('oneof_uint32'))
905 self.assertTrue(m.HasField('oneof_field'))
906 self.assertTrue(m.HasField('oneof_uint32'))
907 self.assertFalse(m.HasField('oneof_string'))
911 self.assertTrue(m.HasField('oneof_string'))
[all …]
Dreflection_test.py145 self.assertFalse(proto.HasField("optional_float"))
195 self.assertFalse(proto.HasField("optional_nested_message"))
247 self.assertFalse(proto.HasField('oneof_uint32'))
252 self.assertFalse(proto.HasField('oneof_nested_message'))
272 self.assertTrue(proto.HasField('optional_nested_message'))
278 self.assertFalse(proto.HasField('optional_nested_message'))
283 self.assertFalse(proto.HasField('optional_nested_message'))
285 self.assertFalse(proto.HasField('optional_nested_message'))
296 self.assertTrue(proto1.HasField('optional_nested_message'))
298 self.assertFalse(proto1.HasField('optional_nested_message'))
[all …]
Dwell_known_types.py681 if source.HasField(name):
696 if source.HasField(name):
791 if not self.fields[key].HasField('list_value'):
798 if not self.fields[key].HasField('struct_value'):
Dpython_message.py306 field_descriptor.GetOptions().HasField('packed') and
864 def HasField(self, field_name): function
872 return HasField(self, self._oneofs[field].name)
882 cls.HasField = HasField
1278 if not self.HasField(field.name):
1372 if nested_field is not None and self.HasField(nested_field.name):
Dwell_known_types_test.py630 self.assertTrue(nested_dst.HasField('payload'))
633 self.assertTrue(nested_dst.HasField('payload'))
639 self.assertFalse(nested_dst.HasField('payload'))
662 self.assertTrue(dst.HasField('foo_message'))
663 self.assertFalse(dst.HasField('foo_lazy_message'))
/third_party/protobuf/csharp/src/Google.Protobuf/
DUnknownFieldSet.cs65 internal bool HasField(int field) in HasField() method in Google.Protobuf.UnknownFieldSet
367 if (HasField(number)) in MergeField()
/third_party/protobuf/csharp/src/Google.Protobuf.Test/
DUnknownFieldSetTest.cs70 Assert.IsFalse(otherUnknownFields.HasField(1)); in MergeUnknownFieldSet()
72 Assert.IsTrue(otherUnknownFields.HasField(1)); in MergeUnknownFieldSet()
/third_party/protobuf/python/google/protobuf/
Dmessage.py263 def HasField(self, field_name): member in Message
Ddescriptor_pool.py104 if descriptor_proto.HasField('options'):
902 if field_desc.HasField('oneof_index'):
1056 if not field_proto.HasField('type'):
1075 elif field_proto.HasField('default_value'):
Ddescriptor.py1014 if descriptor_proto.HasField('options'):
1119 if field_proto.HasField('type_name'):
/third_party/protobuf/python/google/protobuf/pyext/
Dmessage.h244 PyObject* HasField(CMessage* self, PyObject* arg);
Dmessage.cc868 reflection->HasField(*message, field)) { in MaybeReleaseOverlappingOneofField()
903 if (reflection->HasField(*message, descriptor)) { in FixupMessageAfterMerge()
1398 return message->GetReflection()->HasField(*message, field_descriptor); in HasFieldByDescriptor()
1441 PyObject* HasField(CMessage* self, PyObject* arg) { in HasField() function
1473 if (message->GetReflection()->HasField(*message, field_descriptor)) { in HasField()
2286 cmsg->read_only = !reflection->HasField(*self->message, field_descriptor); in InternalGetSubMessage()
2532 { "HasField", (PyCFunction)HasField, METH_O,
Dextension_dict.cc302 if (reflection->HasField(*message, field_descriptor)) { in Contains()
/third_party/node/deps/v8/src/torque/
Dtypes.cc376 bool AggregateType::HasField(const std::string& name) const { in HasField() function in v8::internal::torque::AggregateType
383 return parent_class->HasField(name); in HasField()
1311 if (!class_type.HasField(identifier->name->value)) return {}; in ExtractSimpleFieldArraySize()

12