diff options
Diffstat (limited to 'src/unittest')
-rw-r--r-- | src/unittest/test_connection.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/unittest/test_connection.cpp b/src/unittest/test_connection.cpp index c3aacc536..23b7e9105 100644 --- a/src/unittest/test_connection.cpp +++ b/src/unittest/test_connection.cpp @@ -88,7 +88,7 @@ void TestConnection::testNetworkPacketSerialize() }; if (sizeof(wchar_t) == 2) - warningstream << __func__ << " may fail on this platform." << std::endl; + warningstream << __FUNCTION__ << " may fail on this platform." << std::endl; { NetworkPacket pkt(123, 0); @@ -96,7 +96,7 @@ void TestConnection::testNetworkPacketSerialize() // serializing wide strings should do surrogate encoding, we test that here pkt << std::wstring(L"\U00020b9a"); - SharedBuffer<u8> buf = pkt.oldForgePacket(); + auto buf = pkt.oldForgePacket(); UASSERTEQ(int, buf.getSize(), sizeof(expected)); UASSERT(!memcmp(expected, &buf[0], buf.getSize())); } @@ -280,7 +280,7 @@ void TestConnection::testConnectSendReceive() NetworkPacket pkt; pkt.putRawPacket((u8*) "Hello World !", 14, 0); - SharedBuffer<u8> sentdata = pkt.oldForgePacket(); + auto sentdata = pkt.oldForgePacket(); infostream<<"** running client.Send()"<<std::endl; client.Send(PEER_ID_SERVER, 0, &pkt, true); @@ -295,7 +295,7 @@ void TestConnection::testConnectSendReceive() << ", data=" << (const char*)pkt.getU8Ptr(0) << std::endl; - SharedBuffer<u8> recvdata = pkt.oldForgePacket(); + auto recvdata = pkt.oldForgePacket(); UASSERT(memcmp(*sentdata, *recvdata, recvdata.getSize()) == 0); } @@ -324,13 +324,13 @@ void TestConnection::testConnectSendReceive() infostream << "..."; infostream << std::endl; - SharedBuffer<u8> sentdata = pkt.oldForgePacket(); + auto sentdata = pkt.oldForgePacket(); server.Send(peer_id_client, 0, &pkt, true); //sleep_ms(3000); - SharedBuffer<u8> recvdata; + Buffer<u8> recvdata; infostream << "** running client.Receive()" << std::endl; session_t peer_id = 132; u16 size = 0; |