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

Function TEST_P

eval/public/structs/field_access_impl_test.cc:185–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183};
184
185TEST_P(SingleFieldTest, Getter) {
186 TestAllTypes test_message;
187 ASSERT_TRUE(
188 google::protobuf::TextFormat::ParseFromString(message_textproto(), &test_message));
189 google::protobuf::Arena arena;
190
191 ASSERT_OK_AND_ASSIGN(
192 CelValue accessed_value,
193 CreateValueFromSingleField(
194 &test_message,
195 test_message.GetDescriptor()->FindFieldByName(field_name()),
196 ProtoWrapperTypeOptions::kUnsetProtoDefault,
197 &CelProtoWrapper::InternalWrapMessage, &arena));
198
199 EXPECT_THAT(accessed_value, test::EqualsCelValue(cel_value()));
200}
201
202TEST_P(SingleFieldTest, Setter) {
203 TestAllTypes test_message;

Callers

nothing calls this directly

Calls 6

EqualsCelValueFunction · 0.85
EqualsProtoFunction · 0.85
SetValueToSingleFieldFunction · 0.70
AddValueToRepeatedFieldFunction · 0.70
FindFieldByNameMethod · 0.45
GetDescriptorMethod · 0.45

Tested by

no test coverage detected