mirror of
https://github.com/aria2/aria2.git
synced 2025-04-06 05:57:36 +03:00
2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed "using namespace std;" from all sources. Appended std:: prefix to c++ standard classes. Included string.h where mem* function are used.
This commit is contained in:
parent
d82e183d34
commit
1b7c198289
801 changed files with 12024 additions and 8627 deletions
|
@ -1,8 +1,9 @@
|
|||
#include "BtSuggestPieceMessage.h"
|
||||
#include "PeerMessageUtil.h"
|
||||
#include <cstring>
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
|
||||
using namespace std;
|
||||
namespace aria2 {
|
||||
|
||||
class BtSuggestPieceMessageTest:public CppUnit::TestFixture {
|
||||
|
||||
|
@ -29,7 +30,7 @@ void BtSuggestPieceMessageTest::testCreate() {
|
|||
unsigned char msg[9];
|
||||
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 5, 13);
|
||||
PeerMessageUtil::setIntParam(&msg[5], 12345);
|
||||
BtSuggestPieceMessageHandle pm = BtSuggestPieceMessage::create(&msg[4], 5);
|
||||
SharedHandle<BtSuggestPieceMessage> pm = BtSuggestPieceMessage::create(&msg[4], 5);
|
||||
CPPUNIT_ASSERT_EQUAL((int8_t)13, pm->getId());
|
||||
CPPUNIT_ASSERT_EQUAL((int32_t)12345, pm->getIndex());
|
||||
|
||||
|
@ -64,6 +65,8 @@ void BtSuggestPieceMessageTest::testToString() {
|
|||
BtSuggestPieceMessage msg;
|
||||
msg.setIndex(12345);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(string("suggest piece index=12345"),
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("suggest piece index=12345"),
|
||||
msg.toString());
|
||||
}
|
||||
|
||||
} // namespace aria2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue