MCPcopy Create free account
hub / github.com/aria2/aria2 / testNumberOptionHandler_min

Method testNumberOptionHandler_min

test/OptionHandlerTest.cc:78–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void OptionHandlerTest::testNumberOptionHandler_min()
79{
80 NumberOptionHandler handler(PREF_TIMEOUT, "", "", 1);
81 Option option;
82 handler.parse(option, "1");
83 CPPUNIT_ASSERT_EQUAL(std::string("1"), option.get(PREF_TIMEOUT));
84 try {
85 handler.parse(option, "0");
86 CPPUNIT_FAIL("exception must be thrown.");
87 }
88 catch (Exception& e) {
89 }
90 CPPUNIT_ASSERT_EQUAL(std::string("1-*"),
91 handler.createPossibleValuesString());
92}
93
94void OptionHandlerTest::testNumberOptionHandler_max()
95{

Callers

nothing calls this directly

Calls 3

parseMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected