diff --git a/test/unittest/transport/TCPv4Tests.cpp b/test/unittest/transport/TCPv4Tests.cpp index ff4d782e393..316a9716176 100644 --- a/test/unittest/transport/TCPv4Tests.cpp +++ b/test/unittest/transport/TCPv4Tests.cpp @@ -1394,7 +1394,7 @@ TEST_F(TCPv4Tests, secure_non_blocking_send) #endif // if ASIO_VERSION >= 101200 io_service.run(); }; - std::thread ioServiceThread(ioServiceFunction); + std::thread ioServiceThread(ioServiceFunction); // TCPChannelResourceSecure::connect() like connection asio::ip::tcp::resolver resolver(io_service); @@ -1441,7 +1441,7 @@ TEST_F(TCPv4Tests, secure_non_blocking_send) // Prepare the message asio::error_code ec; - std::vector message(msg_size*2, 0); + std::vector message(msg_size * 2, 0); const octet* data = message.data(); size_t size = message.size(); @@ -1457,8 +1457,8 @@ TEST_F(TCPv4Tests, secure_non_blocking_send) ASSERT_EQ(ec, asio::error_code()); ASSERT_EQ(bytes_read, size); - // Now try to send a message that is bigger than the buffer size: (msg_size*2 + 1) + bytes_in_send_buffer(0) > 2*sendBufferSize - message.resize(msg_size*2 + 1); + // Now try to send a message that is bigger than the buffer size: (msg_size*2 + 1) + bytes_in_send_buffer(0) > 2*sendBufferSize + message.resize(msg_size * 2 + 1); data = message.data(); size = message.size(); bytes_sent = sender_channel_resource->send(nullptr, 0, data, size, ec); @@ -1954,7 +1954,7 @@ TEST_F(TCPv4Tests, non_blocking_send) // Prepare the message asio::error_code ec; - std::vector message(msg_size*2, 0); + std::vector message(msg_size * 2, 0); const octet* data = message.data(); size_t size = message.size(); @@ -1968,8 +1968,8 @@ TEST_F(TCPv4Tests, non_blocking_send) size_t bytes_read = asio::read(socket, asio::buffer(buffer, size), asio::transfer_exactly(size), ec); ASSERT_EQ(bytes_read, size); - // Now try to send a message that is bigger than the buffer size: (msg_size*2 + 1) + bytes_in_send_buffer(0) > 2*sendBufferSize - message.resize(msg_size*2 + 1); + // Now try to send a message that is bigger than the buffer size: (msg_size*2 + 1) + bytes_in_send_buffer(0) > 2*sendBufferSize + message.resize(msg_size * 2 + 1); data = message.data(); size = message.size(); bytes_sent = sender_channel_resource->send(nullptr, 0, data, size, ec); diff --git a/test/unittest/transport/TCPv6Tests.cpp b/test/unittest/transport/TCPv6Tests.cpp index 3b82193d370..c88a79ff063 100644 --- a/test/unittest/transport/TCPv6Tests.cpp +++ b/test/unittest/transport/TCPv6Tests.cpp @@ -368,7 +368,7 @@ TEST_F(TCPv6Tests, non_blocking_send) // Prepare the message asio::error_code ec; - std::vector message(msg_size*2, 0); + std::vector message(msg_size * 2, 0); const octet* data = message.data(); size_t size = message.size(); @@ -382,8 +382,8 @@ TEST_F(TCPv6Tests, non_blocking_send) size_t bytes_read = asio::read(socket, asio::buffer(buffer, size), asio::transfer_exactly(size), ec); ASSERT_EQ(bytes_read, size); - // Now try to send a message that is bigger than the buffer size: (msg_size*2 + 1) + bytes_in_send_buffer(0) > 2*sendBufferSize - message.resize(msg_size*2 + 1); + // Now try to send a message that is bigger than the buffer size: (msg_size*2 + 1) + bytes_in_send_buffer(0) > 2*sendBufferSize + message.resize(msg_size * 2 + 1); data = message.data(); size = message.size(); bytes_sent = sender_channel_resource->send(nullptr, 0, data, size, ec);