mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-04-30 04:33:53 +00:00
Check that no change doesn't throw
This commit is contained in:
parent
e26fcd2470
commit
88c680a12b
@ -125,13 +125,16 @@ TEST_F(TApp, IncorrectConstructionFlagPositional3) {
|
||||
|
||||
TEST_F(TApp, IncorrectConstructionFlagExpected) {
|
||||
auto cat = app.add_flag("--cat");
|
||||
EXPECT_NO_THROW(cat->expected(0));
|
||||
EXPECT_THROW(cat->expected(1), CLI::IncorrectConstruction);
|
||||
}
|
||||
|
||||
TEST_F(TApp, IncorrectConstructionOptionAsFlag) {
|
||||
int x;
|
||||
auto cat = app.add_option("--cat", x);
|
||||
EXPECT_NO_THROW(cat->expected(1));
|
||||
EXPECT_THROW(cat->expected(0), CLI::IncorrectConstruction);
|
||||
EXPECT_THROW(cat->expected(2), CLI::IncorrectConstruction);
|
||||
}
|
||||
|
||||
TEST_F(TApp, IncorrectConstructionOptionAsVector) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user