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

Function CreateMap

eval/public/containers/field_backed_map_impl_test.cc:23–30  ·  view source on GitHub ↗

Test factory for FieldBackedMaps from message and field name.

Source from the content-addressed store, hash-verified

21
22// Test factory for FieldBackedMaps from message and field name.
23std::unique_ptr<FieldBackedMapImpl> CreateMap(const TestMessage* message,
24 const std::string& field,
25 google::protobuf::Arena* arena) {
26 const google::protobuf::FieldDescriptor* field_desc =
27 message->GetDescriptor()->FindFieldByName(field);
28
29 return std::make_unique<FieldBackedMapImpl>(message, field_desc, arena);
30}
31
32TEST(FieldBackedMapImplTest, BadKeyTypeTest) {
33 TestMessage message;

Callers 15

TESTFunction · 0.70
operator[]Method · 0.50
operator[]Method · 0.50
operator[]Method · 0.50
TESTFunction · 0.50
TESTFunction · 0.50
CreateMapMethod · 0.50
TestInMapMethod · 0.50
TestInDeprecatedMapMethod · 0.50
TestInFunctionMapMethod · 0.50
TEST_FFunction · 0.50
CreateValueFromFieldFunction · 0.50

Calls 2

FindFieldByNameMethod · 0.45
GetDescriptorMethod · 0.45

Tested by

no test coverage detected