| 92 | } |
| 93 | |
| 94 | void 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 | |
| 110 | void OptionHandlerTest::testNumberOptionHandler_min_max() |
| 111 | { |
nothing calls this directly
no test coverage detected