Commit eed238364b761ed5e23f6dd73081420add2261c2

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

Expanding tests

tests/AppTest.cpp
@@ -1161,7 +1161,7 @@ TEST_F(TApp, NeedsMixedFlags) { @@ -1161,7 +1161,7 @@ TEST_F(TApp, NeedsMixedFlags) {
1161 run(); 1161 run();
1162 } 1162 }
1163 1163
1164 -#if __cplusplus <= 201703L 1164 +#ifndef CLI11_CPP20
1165 1165
1166 TEST_F(TApp, RequiresMixedFlags) { 1166 TEST_F(TApp, RequiresMixedFlags) {
1167 CLI::Option *opt1 = app.add_flag("--opt1"); 1167 CLI::Option *opt1 = app.add_flag("--opt1");
tests/CreationTest.cpp
@@ -168,6 +168,13 @@ TEST_F(TApp, IncorrectConstructionNeedsCannotFind) { @@ -168,6 +168,13 @@ TEST_F(TApp, IncorrectConstructionNeedsCannotFind) {
168 EXPECT_THROW(cat->needs("--nothing"), CLI::IncorrectConstruction); 168 EXPECT_THROW(cat->needs("--nothing"), CLI::IncorrectConstruction);
169 } 169 }
170 170
  171 +#ifndef CLI11_CPP20
  172 +TEST_F(TApp, IncorrectConstructionRequiresCannotFind) {
  173 + auto cat = app.add_flag("--cat");
  174 + EXPECT_THROW(cat->requires("--nothing"), CLI::IncorrectConstruction);
  175 +}
  176 +#endif
  177 +
171 TEST_F(TApp, IncorrectConstructionExcludesCannotFind) { 178 TEST_F(TApp, IncorrectConstructionExcludesCannotFind) {
172 auto cat = app.add_flag("--cat"); 179 auto cat = app.add_flag("--cat");
173 EXPECT_THROW(cat->excludes("--nothing"), CLI::IncorrectConstruction); 180 EXPECT_THROW(cat->excludes("--nothing"), CLI::IncorrectConstruction);