| 105 | } |
| 106 | |
| 107 | absl::Status DoubleValue::Equal( |
| 108 | const Value& other, |
| 109 | const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
| 110 | google::protobuf::MessageFactory* absl_nonnull message_factory, |
| 111 | google::protobuf::Arena* absl_nonnull arena, Value* absl_nonnull result) const { |
| 112 | ABSL_DCHECK(descriptor_pool != nullptr); |
| 113 | ABSL_DCHECK(message_factory != nullptr); |
| 114 | ABSL_DCHECK(arena != nullptr); |
| 115 | ABSL_DCHECK(result != nullptr); |
| 116 | |
| 117 | if (auto other_value = other.AsDouble(); other_value.has_value()) { |
| 118 | *result = BoolValue{NativeValue() == other_value->NativeValue()}; |
| 119 | return absl::OkStatus(); |
| 120 | } |
| 121 | if (auto other_value = other.AsInt(); other_value.has_value()) { |
| 122 | *result = |
| 123 | BoolValue{internal::Number::FromDouble(NativeValue()) == |
| 124 | internal::Number::FromInt64(other_value->NativeValue())}; |
| 125 | return absl::OkStatus(); |
| 126 | } |
| 127 | if (auto other_value = other.AsUint(); other_value.has_value()) { |
| 128 | *result = |
| 129 | BoolValue{internal::Number::FromDouble(NativeValue()) == |
| 130 | internal::Number::FromUint64(other_value->NativeValue())}; |
| 131 | return absl::OkStatus(); |
| 132 | } |
| 133 | *result = FalseValue(); |
| 134 | return absl::OkStatus(); |
| 135 | } |
| 136 | |
| 137 | } // namespace cel |
nothing calls this directly
no test coverage detected