summaryrefslogtreecommitdiff
path: root/test/DHTRoutingTableSerializerTest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/DHTRoutingTableSerializerTest.cc')
-rw-r--r--test/DHTRoutingTableSerializerTest.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/DHTRoutingTableSerializerTest.cc b/test/DHTRoutingTableSerializerTest.cc
index 4b069819..81450a6b 100644
--- a/test/DHTRoutingTableSerializerTest.cc
+++ b/test/DHTRoutingTableSerializerTest.cc
@@ -115,7 +115,8 @@ void DHTRoutingTableSerializerTest::testSerialize()
ss.read(buf, 6);
{
std::pair<std::string, uint16_t> peer =
- bittorrent::unpackcompact(reinterpret_cast<const unsigned char*>(buf));
+ bittorrent::unpackcompact(reinterpret_cast<const unsigned char*>(buf),
+ AF_INET);
CPPUNIT_ASSERT_EQUAL(std::string("192.168.0.1"), peer.first);
CPPUNIT_ASSERT_EQUAL((uint16_t)6881, peer.second);
}
@@ -174,7 +175,8 @@ void DHTRoutingTableSerializerTest::testSerialize()
ss.read(buf, 6);
{
std::pair<std::string, uint16_t> peer =
- bittorrent::unpackcompact(reinterpret_cast<const unsigned char*>(buf));
+ bittorrent::unpackcompact(reinterpret_cast<const unsigned char*>(buf),
+ AF_INET);
CPPUNIT_ASSERT_EQUAL(std::string("192.168.0.3"), peer.first);
CPPUNIT_ASSERT_EQUAL((uint16_t)6883, peer.second);
}