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

Method TestEvaluate

extensions/regex_ext_test.cc:206–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204 }
205
206 absl::StatusOr<Value> TestEvaluate(const std::string& expr_string) {
207 CEL_ASSIGN_OR_RETURN(auto parsed_expr, Parse(expr_string));
208 CEL_ASSIGN_OR_RETURN(std::unique_ptr<cel::Program> program,
209 cel::extensions::ProtobufRuntimeAdapter::CreateProgram(
210 *runtime_, parsed_expr));
211 Activation activation;
212 return program->Evaluate(&arena_, activation);
213 }
214
215 google::protobuf::Arena arena_;
216 std::unique_ptr<const Runtime> runtime_;

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