Skip to content

Commit c99a3c3

Browse files
committed
[tests] util_tests.cpp: actually check ignored args
An array with 7 elements was setup for checking argument parsing, but was passed to ParseParamaeters with argc=5, meaning the interpretation of the last two arguments was never actually checked.
1 parent 20166f8 commit c99a3c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/util_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ BOOST_AUTO_TEST_CASE(util_ParseParameters)
121121
testArgs.ParseParameters(1, (char**)argv_test);
122122
BOOST_CHECK(testArgs.GetMapArgs().empty() && testArgs.GetMapMultiArgs().empty());
123123

124-
testArgs.ParseParameters(5, (char**)argv_test);
124+
testArgs.ParseParameters(7, (char**)argv_test);
125125
// expectation: -ignored is ignored (program name argument),
126126
// -a, -b and -ccc end up in map, -d ignored because it is after
127127
// a non-option argument (non-GNU option parsing)

0 commit comments

Comments
 (0)