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

@ -3,9 +3,10 @@
#include "DefaultPieceStorage.h"
#include "Option.h"
#include "DiskAdaptor.h"
#include "FileEntry.h"
#include <cppunit/extensions/HelperMacros.h>
using namespace std;
namespace aria2 {
class IteratableChunkChecksumValidatorTest:public CppUnit::TestFixture {
@ -31,11 +32,11 @@ const char* IteratableChunkChecksumValidatorTest::csArray[] = { "29b0e7878271645
void IteratableChunkChecksumValidatorTest::testValidate() {
Option option;
SingleFileDownloadContextHandle dctx =
SharedHandle<SingleFileDownloadContext> dctx =
new SingleFileDownloadContext(100, 250, "chunkChecksumTestFile250.txt");
dctx->setPieceHashes(Strings(&csArray[0], &csArray[3]));
dctx->setPieceHashes(std::deque<std::string>(&csArray[0], &csArray[3]));
dctx->setPieceHashAlgo("sha1");
DefaultPieceStorageHandle ps = new DefaultPieceStorage(dctx, &option);
SharedHandle<DefaultPieceStorage> ps = new DefaultPieceStorage(dctx, &option);
ps->initStorage();
ps->getDiskAdaptor()->openFile();
@ -51,7 +52,7 @@ void IteratableChunkChecksumValidatorTest::testValidate() {
CPPUNIT_ASSERT(ps->downloadFinished());
// make the test fail
Strings badHashes(&csArray[0], &csArray[3]);
std::deque<std::string> badHashes(&csArray[0], &csArray[3]);
badHashes[1] = "ffffffffffffffffffffffffffffffffffffffff";
dctx->setPieceHashes(badHashes);
@ -64,3 +65,5 @@ void IteratableChunkChecksumValidatorTest::testValidate() {
CPPUNIT_ASSERT(!ps->hasPiece(1));
CPPUNIT_ASSERT(ps->hasPiece(2));
}
} // namespace aria2