From defbe36b65a708aa9f8d164946509d3d924b2f72 Mon Sep 17 00:00:00 2001 From: "Taylor C. Richberger" Date: Mon, 16 Oct 2017 13:36:52 -0600 Subject: [PATCH] add a few test cases and bump version --- Doxyfile | 2 +- test.cxx | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Doxyfile b/Doxyfile index 96e6417..faf7fe3 100644 --- a/Doxyfile +++ b/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "args" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 6.1.0 +PROJECT_NUMBER = 6.2.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/test.cxx b/test.cxx index 0d471a5..b5678f4 100644 --- a/test.cxx +++ b/test.cxx @@ -622,6 +622,11 @@ TEST_CASE("Implicit values work as expected", "[args]") REQUIRE_NOTHROW(parser.ParseArgs(std::vector{"-j", "-f"})); REQUIRE(args::get(j) == 0); + REQUIRE(foo); + + REQUIRE_NOTHROW(parser.ParseArgs(std::vector{"-f"})); + REQUIRE(args::get(j) == 1); + REQUIRE_FALSE(j); } TEST_CASE("Nargs work as expected", "[args]") @@ -657,6 +662,8 @@ TEST_CASE("Nargs work as expected", "[args]") vec.push_back(c); } + REQUIRE((vec == std::vector{1, 2, 3})); + vec.assign(std::begin(b), std::end(b)); REQUIRE((vec == std::vector{1, 2, 3})); parser.SetArgumentSeparations(true, true, false, false);