MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / CreateTestMessage

Function CreateTestMessage

eval/compiler/flat_expr_builder_test.cc:2428–2436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2426}
2427
2428std::pair<google::protobuf::Message*, const google::protobuf::Reflection*> CreateTestMessage(
2429 const google::protobuf::DescriptorPool& descriptor_pool,
2430 google::protobuf::MessageFactory& message_factory, absl::string_view name) {
2431 const google::protobuf::Descriptor* desc = descriptor_pool.FindMessageTypeByName(name);
2432 const google::protobuf::Message* message_prototype = message_factory.GetPrototype(desc);
2433 google::protobuf::Message* message = message_prototype->New();
2434 const google::protobuf::Reflection* refl = message->GetReflection();
2435 return std::make_pair(message, refl);
2436}
2437
2438struct CustomDescriptorPoolTestParam final {
2439 using SetterFunction =

Callers 1

ASSERT_OK_AND_ASSIGNFunction · 0.85

Calls 2

NewMethod · 0.45
GetReflectionMethod · 0.45

Tested by

no test coverage detected