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:
Tatsuhiro Tsujikawa 2008-02-08 15:53:45 +00:00
parent d82e183d34
commit 1b7c198289
801 changed files with 12024 additions and 8627 deletions

View file

@ -1,8 +1,10 @@
#include "BtHaveAllMessage.h"
#include "PeerMessageUtil.h"
#include "Peer.h"
#include <cstring>
#include <cppunit/extensions/HelperMacros.h>
using namespace std;
namespace aria2 {
class BtHaveAllMessageTest:public CppUnit::TestFixture {
@ -28,7 +30,7 @@ CPPUNIT_TEST_SUITE_REGISTRATION(BtHaveAllMessageTest);
void BtHaveAllMessageTest::testCreate() {
unsigned char msg[5];
PeerMessageUtil::createPeerMessageString(msg, sizeof(msg), 1, 14);
BtHaveAllMessageHandle pm = BtHaveAllMessage::create(&msg[4], 1);
SharedHandle<BtHaveAllMessage> pm = BtHaveAllMessage::create(&msg[4], 1);
CPPUNIT_ASSERT_EQUAL((int8_t)14, pm->getId());
// case: payload size is wrong
@ -58,7 +60,7 @@ void BtHaveAllMessageTest::testGetMessage() {
void BtHaveAllMessageTest::testDoReceivedAction() {
BtHaveAllMessage msg;
PeerHandle peer = new Peer("host", 6969);
SharedHandle<Peer> peer = new Peer("host", 6969);
peer->allocateBitfield(16*1024, 256*1024);
peer->setFastExtensionEnabled(true);
msg.setPeer(peer);
@ -74,3 +76,5 @@ void BtHaveAllMessageTest::testDoReceivedAction() {
CPPUNIT_FAIL("exception must be thrown.");
} catch(...) {}
}
} // namespace aria2