mirror of
https://github.com/aria2/aria2.git
synced 2025-04-05 05:27:38 +03:00
Rewritten OptionParser. Made it simpler and efficient.
This commit is contained in:
parent
3832ed97c6
commit
d5c8d048ef
16 changed files with 142 additions and 351 deletions
|
@ -11,7 +11,6 @@ namespace aria2 {
|
|||
class OptionHandlerTest:public CppUnit::TestFixture {
|
||||
|
||||
CPPUNIT_TEST_SUITE(OptionHandlerTest);
|
||||
CPPUNIT_TEST(testNullOptionHandler);
|
||||
CPPUNIT_TEST(testBooleanOptionHandler);
|
||||
CPPUNIT_TEST(testNumberOptionHandler);
|
||||
CPPUNIT_TEST(testNumberOptionHandler_min);
|
||||
|
@ -33,7 +32,6 @@ class OptionHandlerTest:public CppUnit::TestFixture {
|
|||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
void testNullOptionHandler();
|
||||
void testBooleanOptionHandler();
|
||||
void testNumberOptionHandler();
|
||||
void testNumberOptionHandler_min();
|
||||
|
@ -57,15 +55,6 @@ public:
|
|||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION( OptionHandlerTest );
|
||||
|
||||
void OptionHandlerTest::testNullOptionHandler()
|
||||
{
|
||||
NullOptionHandler handler;
|
||||
CPPUNIT_ASSERT(handler.canHandle("foo"));
|
||||
Option option;
|
||||
handler.parse(option, "bar");
|
||||
CPPUNIT_ASSERT(!option.defined(PREF_TIMEOUT));
|
||||
}
|
||||
|
||||
void OptionHandlerTest::testBooleanOptionHandler()
|
||||
{
|
||||
BooleanOptionHandler handler(PREF_DAEMON);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue