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

Function TestOnlySelect

eval/eval/select_step.cc:78–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void TestOnlySelect(const StructValue& msg, const std::string& field,
79 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
80 google::protobuf::MessageFactory* absl_nonnull message_factory,
81 google::protobuf::Arena* absl_nonnull arena,
82 Value* absl_nonnull result) {
83 absl::StatusOr<bool> has_field = msg.HasFieldByName(field);
84
85 if (!has_field.ok()) {
86 *result = ErrorValue(std::move(has_field).status());
87 return;
88 }
89 *result = BoolValue{*has_field};
90}
91
92void TestOnlySelect(const MapValue& map, const StringValue& field_name,
93 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,

Callers 1

PerformTestOnlySelectMethod · 0.85

Calls 5

ErrorValueFunction · 0.85
HasFieldByNameMethod · 0.45
okMethod · 0.45
HasMethod · 0.45
IsUnknownMethod · 0.45

Tested by

no test coverage detected