Fix unit test error

pull/43/head
Tatsuhiro Tsujikawa 2013-01-14 21:34:33 +09:00
parent d05ef28104
commit 2e216a9403
1 changed files with 2 additions and 2 deletions

View File

@ -139,9 +139,9 @@ void BtPieceMessageTest::testCreateMessageHeader() {
bittorrent::createPeerMessageString(data, sizeof(data), 9+1024, 7);
bittorrent::setIntParam(&data[5], 12345);
bittorrent::setIntParam(&data[9], 256);
unsigned char* rawmsg = msg.createMessageHeader();
unsigned char rawmsg[13];
msg.createMessageHeader(rawmsg);
CPPUNIT_ASSERT(memcmp(rawmsg, data, 13) == 0);
delete [] rawmsg;
}
void BtPieceMessageTest::testChokingEvent() {