mirror of
https://github.com/aria2/aria2.git
synced 2025-04-07 06:27:37 +03:00
2009-05-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added test case for zero-length filter. * test/BitfieldManTest.cc
This commit is contained in:
parent
d3ae337ace
commit
c43e26c2a9
2 changed files with 14 additions and 0 deletions
|
@ -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>
|
2009-05-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
getFiles command now returns file data for finished/stopped
|
getFiles command now returns file data for finished/stopped
|
||||||
|
|
|
@ -33,6 +33,7 @@ class BitfieldManTest:public CppUnit::TestFixture {
|
||||||
CPPUNIT_TEST(testGetMissingUnusedIndex_noarg);
|
CPPUNIT_TEST(testGetMissingUnusedIndex_noarg);
|
||||||
CPPUNIT_TEST(testCountFilteredBlock);
|
CPPUNIT_TEST(testCountFilteredBlock);
|
||||||
CPPUNIT_TEST(testCountMissingBlock);
|
CPPUNIT_TEST(testCountMissingBlock);
|
||||||
|
CPPUNIT_TEST(testZeroLengthFilter);
|
||||||
CPPUNIT_TEST_SUITE_END();
|
CPPUNIT_TEST_SUITE_END();
|
||||||
private:
|
private:
|
||||||
SharedHandle<Randomizer> fixedNumberRandomizer;
|
SharedHandle<Randomizer> fixedNumberRandomizer;
|
||||||
|
@ -69,6 +70,7 @@ public:
|
||||||
void testSetBitRange();
|
void testSetBitRange();
|
||||||
void testCountFilteredBlock();
|
void testCountFilteredBlock();
|
||||||
void testCountMissingBlock();
|
void testCountMissingBlock();
|
||||||
|
void testZeroLengthFilter();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -771,4 +773,11 @@ void BitfieldManTest::testCountMissingBlock()
|
||||||
CPPUNIT_ASSERT_EQUAL((size_t)0, bt.countMissingBlock());
|
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
|
} // namespace aria2
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue