7 #define BAD_OPTION "test="
10 using namespace command;
12 void _function(int) { }
15 Option<int> option(NAME, "Option should throw exception on missing value", _function);
18 if (option.understand(BAD_OPTION)) {
19 std::cout << option.describe() << " but instead it understanded it\n";
22 catch(std::invalid_argument e) {
23 std::cout << option.describe() << " and it was thrown correctly\n";
27 std::cout << option.describe() << " but nothing happened\n";