1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-05-07 23:33:52 +00:00

Expanding tests

This commit is contained in:
Henry Fredrick Schreiner 2018-04-03 12:03:33 +02:00 committed by Henry Schreiner
parent ede871c014
commit eed238364b
2 changed files with 8 additions and 1 deletions

View File

@ -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");

View File

@ -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);