diff --git a/tests/AppTest.cpp b/tests/AppTest.cpp index 38b87a0..03a50f2 100644 --- a/tests/AppTest.cpp +++ b/tests/AppTest.cpp @@ -1161,7 +1161,7 @@ TEST_F(TApp, NeedsMixedFlags) { run(); } -#if __cplusplus <= 201703L +#ifndef CLI11_CPP20 TEST_F(TApp, RequiresMixedFlags) { CLI::Option *opt1 = app.add_flag("--opt1"); diff --git a/tests/CreationTest.cpp b/tests/CreationTest.cpp index 1be2590..ccf3eea 100644 --- a/tests/CreationTest.cpp +++ b/tests/CreationTest.cpp @@ -168,6 +168,13 @@ TEST_F(TApp, IncorrectConstructionNeedsCannotFind) { EXPECT_THROW(cat->needs("--nothing"), CLI::IncorrectConstruction); } +#ifndef CLI11_CPP20 +TEST_F(TApp, IncorrectConstructionRequiresCannotFind) { + auto cat = app.add_flag("--cat"); + EXPECT_THROW(cat->requires("--nothing"), CLI::IncorrectConstruction); +} +#endif + TEST_F(TApp, IncorrectConstructionExcludesCannotFind) { auto cat = app.add_flag("--cat"); EXPECT_THROW(cat->excludes("--nothing"), CLI::IncorrectConstruction);