| 213 | } |
| 214 | |
| 215 | std::unique_ptr<CelExpressionFlatImpl> CreateExpressionImpl( |
| 216 | const cel::RuntimeOptions& options, |
| 217 | std::unique_ptr<DirectExpressionStep> expr) { |
| 218 | ExecutionPath path; |
| 219 | path.push_back(std::make_unique<WrappedDirectStep>(std::move(expr), -1)); |
| 220 | |
| 221 | auto env = NewTestingRuntimeEnv(); |
| 222 | return std::make_unique<CelExpressionFlatImpl>( |
| 223 | env, |
| 224 | FlatExpression(std::move(path), /*comprehension_slot_count=*/0, |
| 225 | env->type_registry.GetComposedTypeProvider(), options)); |
| 226 | } |
| 227 | |
| 228 | absl::StatusOr<std::unique_ptr<ExpressionStep>> MakeTestFunctionStep( |
| 229 | const CallExpr& call, const CelFunctionRegistry& registry) { |
no test coverage detected