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

Method TestEvaluate

extensions/regex_functions_test.cc:87–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85 }
86
87 absl::StatusOr<Value> TestEvaluate(const std::string& expr_string) {
88 CEL_ASSIGN_OR_RETURN(auto parsed_expr, Parse(expr_string));
89 CEL_ASSIGN_OR_RETURN(std::unique_ptr<cel::Program> program,
90 cel::extensions::ProtobufRuntimeAdapter::CreateProgram(
91 *runtime_, parsed_expr));
92 Activation activation;
93 return program->Evaluate(&arena_, activation);
94 }
95
96 const google::protobuf::DescriptorPool* descriptor_pool_ =
97 internal::GetTestingDescriptorPool();

Callers

nothing calls this directly

Calls 3

CreateProgramFunction · 0.85
CEL_ASSIGN_OR_RETURNFunction · 0.50
EvaluateMethod · 0.45

Tested by

no test coverage detected