From eed238364b761ed5e23f6dd73081420add2261c2 Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Tue, 3 Apr 2018 12:03:33 +0200 Subject: [PATCH] Expanding tests --- tests/AppTest.cpp | 2 +- tests/CreationTest.cpp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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); -- libgit2 0.21.4