Rewritten LpdMessageReceiver::receiveMessage()

This commit is contained in:
Tatsuhiro Tsujikawa 2012-09-26 23:45:58 +09:00
parent 3a917ff695
commit b9f972665b
3 changed files with 29 additions and 26 deletions

View file

@ -67,9 +67,7 @@ void LpdMessageReceiverTest::testReceiveMessage()
rcv.getSocket()->isReadable(5);
msg = rcv.receiveMessage();
CPPUNIT_ASSERT(msg);
CPPUNIT_ASSERT(!msg->peer);
CPPUNIT_ASSERT(msg->infoHash.empty());
CPPUNIT_ASSERT(!msg);
// Bad port
request =
@ -81,9 +79,7 @@ void LpdMessageReceiverTest::testReceiveMessage()
rcv.getSocket()->isReadable(5);
msg = rcv.receiveMessage();
CPPUNIT_ASSERT(msg);
CPPUNIT_ASSERT(!msg->peer);
CPPUNIT_ASSERT(msg->infoHash.empty());
CPPUNIT_ASSERT(!msg);
// No data available
msg = rcv.receiveMessage();