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

Method testFloatNumberOptionHandler_min

test/OptionHandlerTest.cc:210–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210void OptionHandlerTest::testFloatNumberOptionHandler_min()
211{
212 FloatNumberOptionHandler handler(PREF_TIMEOUT, "", "", 0.0);
213 Option option;
214 handler.parse(option, "0.0");
215 CPPUNIT_ASSERT_EQUAL(std::string("0.0"), option.get(PREF_TIMEOUT));
216 try {
217 handler.parse(option, "-0.1");
218 CPPUNIT_FAIL("exception must be thrown.");
219 }
220 catch (Exception& e) {
221 }
222 CPPUNIT_ASSERT_EQUAL(std::string("0.0-*"),
223 handler.createPossibleValuesString());
224}
225
226void OptionHandlerTest::testFloatNumberOptionHandler_max()
227{

Callers

nothing calls this directly

Calls 3

parseMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected