Commit 88c680a12b69e567ad706e18f02c2741a2e7de69

Authored by Henry Fredrick Schreiner
Committed by Henry Schreiner
1 parent e26fcd24

Check that no change doesn't throw

Showing 1 changed file with 3 additions and 0 deletions
tests/CreationTest.cpp
... ... @@ -125,13 +125,16 @@ TEST_F(TApp, IncorrectConstructionFlagPositional3) {
125 125  
126 126 TEST_F(TApp, IncorrectConstructionFlagExpected) {
127 127 auto cat = app.add_flag("--cat");
  128 + EXPECT_NO_THROW(cat->expected(0));
128 129 EXPECT_THROW(cat->expected(1), CLI::IncorrectConstruction);
129 130 }
130 131  
131 132 TEST_F(TApp, IncorrectConstructionOptionAsFlag) {
132 133 int x;
133 134 auto cat = app.add_option("--cat", x);
  135 + EXPECT_NO_THROW(cat->expected(1));
134 136 EXPECT_THROW(cat->expected(0), CLI::IncorrectConstruction);
  137 + EXPECT_THROW(cat->expected(2), CLI::IncorrectConstruction);
135 138 }
136 139  
137 140 TEST_F(TApp, IncorrectConstructionOptionAsVector) {
... ...