Protocols::BitTorrent::Bencoding::Testing::BDecoderTest Class Reference

Inherits TestFixture.

Inheritance diagram for Protocols::BitTorrent::Bencoding::Testing::BDecoderTest:

Inheritance graph
[legend]
Collaboration diagram for Protocols::BitTorrent::Bencoding::Testing::BDecoderTest:

Collaboration graph
[legend]
List of all members.

Detailed Description

BDecoder class testing unit.

Definition at line 40 of file BDecoderTest.cpp.

Public Member Functions

 BDecoderTest ()
 Default ctor.
void testCtors ()
void testReadDictionary ()
void testMalFormedRead ()
void testReadStringWithTooManyElements ()
void testReadStringWithNoElement ()
void testReadStringWithOneElement ()
void testReadStringWithWrongCount ()
void testReadValidQInt64 ()
void testReadOverflowingQInt64 ()
void testReadQInt64Max ()
void testReadQInt64Min ()
void testReadQuint64Max ()
void testReadZero ()
void testReadNegative ()
void testReadDoubleAsInt ()
void testReadValidListOneElement ()
void testReadInvalidList ()
void testReadTorrent ()

Private Member Functions

 CPPUNIT_TEST_SUITE (BDecoderTest)
 CPPUNIT_TEST (testCtors)
 CPPUNIT_TEST (testReadTorrent)
 CPPUNIT_TEST (testMalFormedRead)
 CPPUNIT_TEST (testReadDictionary)
 CPPUNIT_TEST (testReadInvalidList)
 CPPUNIT_TEST (testReadValidQInt64)
 CPPUNIT_TEST (testReadOverflowingQInt64)
 CPPUNIT_TEST (testReadQInt64Max)
 CPPUNIT_TEST (testReadQInt64Min)
 CPPUNIT_TEST (testReadQuint64Max)
 CPPUNIT_TEST (testReadZero)
 CPPUNIT_TEST (testReadNegative)
 CPPUNIT_TEST (testReadValidListOneElement)
 CPPUNIT_TEST (testReadStringWithTooManyElements)
 CPPUNIT_TEST (testReadStringWithNoElement)
 CPPUNIT_TEST (testReadStringWithOneElement)
 CPPUNIT_TEST (testReadStringWithWrongCount)
 CPPUNIT_TEST (testReadDoubleAsInt)
 CPPUNIT_TEST_SUITE_END ()
QByteArray getBytes (const char *rawData) const
template<class T>
QByteArray stringifyNum (T num) const
const BIntgetBInt (const BItem *item) const
const BIntgetBInt () const
const BStringgetBString (const BItem *item) const
const BListgetBList (const BItem *item) const
const BDictionarygetBDictionary (const BItem *item) const
QByteArray readTorrentFile (const char *fileName)

Private Attributes

auto_ptr< BItemm_item


Constructor & Destructor Documentation

Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::BDecoderTest  ) 
 

Default ctor.

Definition at line 351 of file BDecoderTest.cpp.


Member Function Documentation

Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::CPPUNIT_TEST testReadDoubleAsInt   )  [private]
 

Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::CPPUNIT_TEST testReadStringWithWrongCount   )  [private]
 

Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::CPPUNIT_TEST testReadStringWithOneElement   )  [private]
 

Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::CPPUNIT_TEST testReadStringWithNoElement   )  [private]
 

Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::CPPUNIT_TEST testReadStringWithTooManyElements   )  [private]
 

Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::CPPUNIT_TEST testReadValidListOneElement   )  [private]
 

Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::CPPUNIT_TEST testReadNegative   )  [private]
 

Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::CPPUNIT_TEST testReadZero   )  [private]
 

Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::CPPUNIT_TEST testReadQuint64Max   )  [private]
 

Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::CPPUNIT_TEST testReadQInt64Min   )  [private]
 

Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::CPPUNIT_TEST testReadQInt64Max   )  [private]
 

Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::CPPUNIT_TEST testReadOverflowingQInt64   )  [private]
 

Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::CPPUNIT_TEST testReadValidQInt64   )  [private]
 

Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::CPPUNIT_TEST testReadInvalidList   )  [private]
 

Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::CPPUNIT_TEST testReadDictionary   )  [private]
 

Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::CPPUNIT_TEST testMalFormedRead   )  [private]
 

Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::CPPUNIT_TEST testReadTorrent   )  [private]
 

Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::CPPUNIT_TEST testCtors   )  [private]
 

Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::CPPUNIT_TEST_SUITE BDecoderTest   )  [private]
 

Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::CPPUNIT_TEST_SUITE_END  )  [private]
 

const BDictionary* Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::getBDictionary const BItem item  )  const [inline, private]
 

Definition at line 106 of file BDecoderTest.cpp.

const BInt* Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::getBInt  )  const [inline, private]
 

Definition at line 89 of file BDecoderTest.cpp.

const BInt* Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::getBInt const BItem item  )  const [inline, private]
 

Definition at line 83 of file BDecoderTest.cpp.

const BList* Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::getBList const BItem item  )  const [inline, private]
 

Definition at line 100 of file BDecoderTest.cpp.

const BString* Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::getBString const BItem item  )  const [inline, private]
 

Definition at line 94 of file BDecoderTest.cpp.

QByteArray Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::getBytes const char *  rawData  )  const [inline, private]
 

Definition at line 66 of file BDecoderTest.cpp.

QByteArray Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::readTorrentFile const char *  fileName  )  [inline, private]
 

Definition at line 112 of file BDecoderTest.cpp.

template<class T>
QByteArray Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::stringifyNum num  )  const [inline, private]
 

Definition at line 73 of file BDecoderTest.cpp.

void Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::testCtors  )  [inline]
 

Definition at line 123 of file BDecoderTest.cpp.

void Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::testMalFormedRead  )  [inline]
 

Definition at line 185 of file BDecoderTest.cpp.

void Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::testReadDictionary  )  [inline]
 

Definition at line 152 of file BDecoderTest.cpp.

void Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::testReadDoubleAsInt  )  [inline]
 

Definition at line 277 of file BDecoderTest.cpp.

void Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::testReadInvalidList  )  [inline]
 

Definition at line 296 of file BDecoderTest.cpp.

void Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::testReadNegative  )  [inline]
 

Definition at line 269 of file BDecoderTest.cpp.

void Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::testReadOverflowingQInt64  )  [inline]
 

Definition at line 231 of file BDecoderTest.cpp.

void Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::testReadQInt64Max  )  [inline]
 

Definition at line 238 of file BDecoderTest.cpp.

void Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::testReadQInt64Min  )  [inline]
 

Definition at line 246 of file BDecoderTest.cpp.

void Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::testReadQuint64Max  )  [inline]
 

Definition at line 254 of file BDecoderTest.cpp.

void Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::testReadStringWithNoElement  )  [inline]
 

Definition at line 201 of file BDecoderTest.cpp.

void Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::testReadStringWithOneElement  )  [inline]
 

Definition at line 208 of file BDecoderTest.cpp.

void Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::testReadStringWithTooManyElements  )  [inline]
 

Definition at line 194 of file BDecoderTest.cpp.

void Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::testReadStringWithWrongCount  )  [inline]
 

Definition at line 217 of file BDecoderTest.cpp.

void Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::testReadTorrent  )  [inline]
 

Definition at line 304 of file BDecoderTest.cpp.

void Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::testReadValidListOneElement  )  [inline]
 

Definition at line 284 of file BDecoderTest.cpp.

void Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::testReadValidQInt64  )  [inline]
 

Definition at line 224 of file BDecoderTest.cpp.

void Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::testReadZero  )  [inline]
 

Definition at line 261 of file BDecoderTest.cpp.


Member Data Documentation

auto_ptr<BItem> Protocols::BitTorrent::Bencoding::Testing::BDecoderTest::m_item [private]
 

Definition at line 63 of file BDecoderTest.cpp.


The documentation for this class was generated from the following file: