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

Method testNumberOptionHandler_max

test/OptionHandlerTest.cc:94–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94void OptionHandlerTest::testNumberOptionHandler_max()
95{
96 NumberOptionHandler handler(PREF_TIMEOUT, "", "", -1, 100);
97 Option option;
98 handler.parse(option, "100");
99 CPPUNIT_ASSERT_EQUAL(std::string("100"), option.get(PREF_TIMEOUT));
100 try {
101 handler.parse(option, "101");
102 CPPUNIT_FAIL("exception must be thrown.");
103 }
104 catch (Exception& e) {
105 }
106 CPPUNIT_ASSERT_EQUAL(std::string("*-100"),
107 handler.createPossibleValuesString());
108}
109
110void OptionHandlerTest::testNumberOptionHandler_min_max()
111{

Callers

nothing calls this directly

Calls 3

parseMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected