Skip to content

Commit defbe36

Browse files
Taylor C. RichbergerTaylor C. Richberger
authored andcommitted
add a few test cases and bump version
1 parent 54469e1 commit defbe36

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "args"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 6.1.0
41+
PROJECT_NUMBER = 6.2.0
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

test.cxx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,11 @@ TEST_CASE("Implicit values work as expected", "[args]")
622622

623623
REQUIRE_NOTHROW(parser.ParseArgs(std::vector<std::string>{"-j", "-f"}));
624624
REQUIRE(args::get(j) == 0);
625+
REQUIRE(foo);
626+
627+
REQUIRE_NOTHROW(parser.ParseArgs(std::vector<std::string>{"-f"}));
628+
REQUIRE(args::get(j) == 1);
629+
REQUIRE_FALSE(j);
625630
}
626631

627632
TEST_CASE("Nargs work as expected", "[args]")
@@ -657,6 +662,8 @@ TEST_CASE("Nargs work as expected", "[args]")
657662
vec.push_back(c);
658663
}
659664

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

662669
parser.SetArgumentSeparations(true, true, false, false);

0 commit comments

Comments
 (0)