| 116 | } |
| 117 | |
| 118 | absl::Status StringValue::Equal( |
| 119 | const Value& other, |
| 120 | const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
| 121 | google::protobuf::MessageFactory* absl_nonnull message_factory, |
| 122 | google::protobuf::Arena* absl_nonnull arena, Value* absl_nonnull result) const { |
| 123 | ABSL_DCHECK(descriptor_pool != nullptr); |
| 124 | ABSL_DCHECK(message_factory != nullptr); |
| 125 | ABSL_DCHECK(arena != nullptr); |
| 126 | ABSL_DCHECK(result != nullptr); |
| 127 | |
| 128 | if (auto other_value = other.AsString(); other_value.has_value()) { |
| 129 | *result = NativeValue([other_value](const auto& value) -> BoolValue { |
| 130 | return other_value->NativeValue( |
| 131 | [&value](const auto& other_value) -> BoolValue { |
| 132 | return BoolValue{value == other_value}; |
| 133 | }); |
| 134 | }); |
| 135 | return absl::OkStatus(); |
| 136 | } |
| 137 | *result = FalseValue(); |
| 138 | return absl::OkStatus(); |
| 139 | } |
| 140 | |
| 141 | size_t StringValue::Size() const { |
| 142 | return NativeValue([](const auto& alternative) -> size_t { |
nothing calls this directly
no test coverage detected