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

Function Plan

testing/testrunner/runner_lib.cc:99–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99absl::StatusOr<std::unique_ptr<cel::Program>> Plan(
100 const CheckedExpr& checked_expr, const cel::Runtime* runtime) {
101 std::unique_ptr<cel::Ast> ast;
102 CEL_ASSIGN_OR_RETURN(ast, cel::CreateAstFromCheckedExpr(checked_expr));
103 if (ast == nullptr) {
104 return absl::InternalError("No expression provided for testing.");
105 }
106 return runtime->CreateProgram(std::move(ast));
107}
108
109const google::protobuf::DescriptorPool* GetDescriptorPool(const CelTestContext& context) {
110 return context.cel_expression_builder() != nullptr

Callers 2

EvalMethod · 0.85
EvalWithModernBindingsFunction · 0.85

Calls 3

CEL_ASSIGN_OR_RETURNFunction · 0.50
CreateAstFromCheckedExprFunction · 0.50
CreateProgramMethod · 0.45

Tested by

no test coverage detected