mirror of https://github.com/aria2/aria2
2009-05-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added test case for zero-length filter. * test/BitfieldManTest.ccpull/1/head
parent
d3ae337ace
commit
c43e26c2a9
|
@ -1,3 +1,8 @@
|
|||
2009-05-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Added test case for zero-length filter.
|
||||
* test/BitfieldManTest.cc
|
||||
|
||||
2009-05-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
getFiles command now returns file data for finished/stopped
|
||||
|
|
|
@ -33,6 +33,7 @@ class BitfieldManTest:public CppUnit::TestFixture {
|
|||
CPPUNIT_TEST(testGetMissingUnusedIndex_noarg);
|
||||
CPPUNIT_TEST(testCountFilteredBlock);
|
||||
CPPUNIT_TEST(testCountMissingBlock);
|
||||
CPPUNIT_TEST(testZeroLengthFilter);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
private:
|
||||
SharedHandle<Randomizer> fixedNumberRandomizer;
|
||||
|
@ -69,6 +70,7 @@ public:
|
|||
void testSetBitRange();
|
||||
void testCountFilteredBlock();
|
||||
void testCountMissingBlock();
|
||||
void testZeroLengthFilter();
|
||||
};
|
||||
|
||||
|
||||
|
@ -771,4 +773,11 @@ void BitfieldManTest::testCountMissingBlock()
|
|||
CPPUNIT_ASSERT_EQUAL((size_t)0, bt.countMissingBlock());
|
||||
}
|
||||
|
||||
void BitfieldManTest::testZeroLengthFilter()
|
||||
{
|
||||
BitfieldMan bt(1024, 1024*10);
|
||||
bt.enableFilter();
|
||||
CPPUNIT_ASSERT_EQUAL((size_t)0, bt.countMissingBlock());
|
||||
}
|
||||
|
||||
} // namespace aria2
|
||||
|
|
Loading…
Reference in New Issue