diff --git a/tests/proxy.cpp b/tests/proxy.cpp index 56f13c5..bcda66d 100644 --- a/tests/proxy.cpp +++ b/tests/proxy.cpp @@ -99,8 +99,11 @@ TEST(Socks5ProxyTest, ConnectViaProxy) { expected_request[req_len++] = static_cast(network_order_port & 0xFF); std::string expected_data = expected_greeting; - expected_data.append(reinterpret_cast(expected_request.data()), req_len); + auto transformed_view = expected_request | std::views::take(req_len) | std::views::transform([](std::uint8_t byte) { + return static_cast(byte); + }); + expected_data.append(std::ranges::to(transformed_view)); EXPECT_EQ(sent_data, expected_data); co_return;