| 127 | } |
| 128 | |
| 129 | absl::StatusOr<cel::Value> EvalWithLegacyBindings( |
| 130 | const CheckedExpr& checked_expr, const CelTestContext& context, |
| 131 | const Activation& activation, google::protobuf::Arena* arena) { |
| 132 | const auto* builder = context.cel_expression_builder(); |
| 133 | |
| 134 | CEL_ASSIGN_OR_RETURN(std::unique_ptr<CelExpression> sub_expression, |
| 135 | builder->CreateExpression(&checked_expr)); |
| 136 | |
| 137 | CEL_ASSIGN_OR_RETURN(LegacyCelValue legacy_result, |
| 138 | sub_expression->Evaluate(activation, arena)); |
| 139 | |
| 140 | ValueProto result_proto; |
| 141 | CEL_RETURN_IF_ERROR(CelValueToValue(legacy_result, &result_proto)); |
| 142 | return FromExprValue(result_proto, GetDescriptorPool(context), |
| 143 | GetMessageFactory(context), arena); |
| 144 | } |
| 145 | |
| 146 | absl::StatusOr<cel::Value> ResolveValue(const InputValue& input_value, |
| 147 | const CelTestContext& context, |
no test coverage detected