| 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_; |
nothing calls this directly
no test coverage detected