| 76 | } |
| 77 | |
| 78 | void 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 | |
| 94 | void OptionHandlerTest::testNumberOptionHandler_max() |
| 95 | { |
nothing calls this directly
no test coverage detected