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

Method testFloatNumberOptionHandler_max

test/OptionHandlerTest.cc:226–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226void OptionHandlerTest::testFloatNumberOptionHandler_max()
227{
228 FloatNumberOptionHandler handler(PREF_TIMEOUT, "", "", -1, 10.0);
229 Option option;
230 handler.parse(option, "10.0");
231 CPPUNIT_ASSERT_EQUAL(std::string("10.0"), option.get(PREF_TIMEOUT));
232 try {
233 handler.parse(option, "10.1");
234 CPPUNIT_FAIL("exception must be thrown.");
235 }
236 catch (Exception& e) {
237 }
238 CPPUNIT_ASSERT_EQUAL(std::string("*-10.0"),
239 handler.createPossibleValuesString());
240}
241
242void OptionHandlerTest::testFloatNumberOptionHandler_min_max()
243{

Callers

nothing calls this directly

Calls 3

parseMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected