| 10 | TEST_SUITE(ArgumentParser) { |
| 11 | |
| 12 | unsigned parse_first(std::vector<std::string> args) { |
| 13 | for(auto& result: option::table().parse(args)) { |
| 14 | if(result.has_value()) { |
| 15 | return result->id; |
| 16 | } |
| 17 | } |
| 18 | return OPT_INVALID; |
| 19 | } |
| 20 | |
| 21 | TEST_CASE(ParseOptionID) { |
| 22 | ASSERT_EQ(parse_first({"-g"}), OPT_g_Flag); |