| 97 | } |
| 98 | |
| 99 | absl::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 | |
| 109 | const google::protobuf::DescriptorPool* GetDescriptorPool(const CelTestContext& context) { |
| 110 | return context.cel_expression_builder() != nullptr |
no test coverage detected