Skip to content

Commit

Permalink
add a few test cases and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Taylor C. Richberger authored and Taylor C. Richberger committed Oct 16, 2017
1 parent 54469e1 commit defbe36
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions test.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,11 @@ TEST_CASE("Implicit values work as expected", "[args]")

REQUIRE_NOTHROW(parser.ParseArgs(std::vector<std::string>{"-j", "-f"}));
REQUIRE(args::get(j) == 0);
REQUIRE(foo);

REQUIRE_NOTHROW(parser.ParseArgs(std::vector<std::string>{"-f"}));
REQUIRE(args::get(j) == 1);
REQUIRE_FALSE(j);
}

TEST_CASE("Nargs work as expected", "[args]")
Expand Down Expand Up @@ -657,6 +662,8 @@ TEST_CASE("Nargs work as expected", "[args]")
vec.push_back(c);
}

REQUIRE((vec == std::vector<int>{1, 2, 3}));
vec.assign(std::begin(b), std::end(b));
REQUIRE((vec == std::vector<int>{1, 2, 3}));

parser.SetArgumentSeparations(true, true, false, false);
Expand Down

0 comments on commit defbe36

Please sign in to comment.