Skip to content

Commit

Permalink
[MISC] automatic linting
Browse files Browse the repository at this point in the history
  • Loading branch information
seqan-actions committed Feb 14, 2024
1 parent cbfd2c0 commit d9a5a21
Showing 1 changed file with 42 additions and 7 deletions.
49 changes: 42 additions & 7 deletions test/unit/parser/parser_design_error_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,46 @@ TEST(parse_test, not_allowed_after_parse)
}
};

check_error([&parser, &value]() { parser.add_option(value, sharg::config{.short_id = 'i'}); }, "add_option");
check_error([&parser, &flag]() { parser.add_flag(flag, sharg::config{.short_id = 'i'}); }, "add_flag");
check_error([&parser, &value]() { parser.add_positional_option(value, sharg::config{}); }, "add_positional_option");
check_error([&parser]() { parser.add_section(""); }, "add_section");
check_error([&parser]() { parser.add_subsection(""); }, "add_subsection");
check_error([&parser]() { parser.add_line(""); }, "add_line");
check_error([&parser]() { parser.add_list_item("", ""); }, "add_list_item");
check_error(
[&parser, &value]()
{
parser.add_option(value, sharg::config{.short_id = 'i'});
},
"add_option");
check_error(
[&parser, &flag]()
{
parser.add_flag(flag, sharg::config{.short_id = 'i'});
},
"add_flag");
check_error(
[&parser, &value]()
{
parser.add_positional_option(value, sharg::config{});
},
"add_positional_option");
check_error(
[&parser]()
{
parser.add_section("");
},
"add_section");
check_error(
[&parser]()
{
parser.add_subsection("");
},
"add_subsection");
check_error(
[&parser]()
{
parser.add_line("");
},
"add_line");
check_error(
[&parser]()
{
parser.add_list_item("", "");
},
"add_list_item");
}

0 comments on commit d9a5a21

Please sign in to comment.