Skip to content

Commit ddff344

Browse files
author
MarcoFalke
committed
Merge #11997: [tests] util_tests.cpp: actually check ignored args
c99a3c3 [tests] util_tests.cpp: actually check ignored args (Anthony Towns) Pull request description: 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. Tree-SHA512: 7b81fde49742e524f1bb67e2ec084f5909ae36125f237f0210df4587c62e5a5a8f277f13543f0a85ad145c4bb80d62339a7d50d7ed41659df318c8198ea7f428
2 parents 36a5a44 + c99a3c3 commit ddff344

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)