19 #include <google/protobuf/descriptor.h> 20 #include <google/protobuf/util/message_differencer.h> 31 template <
class TFrameworkInfo>
32 std::unique_ptr<::google::protobuf::util::MessageDifferencer>
35 static const ::google::protobuf::Descriptor* descriptor =
36 TFrameworkInfo::descriptor();
38 CHECK_EQ(13, descriptor->field_count())
39 <<
"After adding a field to FrameworkInfo, please make sure " 40 <<
"that FrameworkInfoDifferencer handles this field properly;" 41 <<
"after that, adjust the expected fields count in this check.";
43 std::unique_ptr<::google::protobuf::util::MessageDifferencer> differencer{
44 new ::google::protobuf::util::MessageDifferencer()};
46 differencer->TreatAsSet(descriptor->FindFieldByName(
"capabilities"));
47 differencer->TreatAsSet(descriptor->FindFieldByName(
"roles"));
Definition: attributes.hpp:24
std::unique_ptr<::google::protobuf::util::MessageDifferencer > createFrameworkInfoDifferencer()
Definition: type_utils_differencers.hpp:33