diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-01-04 05:08:08 -0900 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-01-04 05:08:13 -0900 |
commit | ddff3447f29b62d79a33f728791f42fa9436216e (patch) | |
tree | 1192c4a5e14dcab3ed82e47fab1aebdc4c244600 | |
parent | 36a5a4404836da323c755523fbd27563a8e84f94 (diff) | |
parent | c99a3c32c830384a9959a468a13441fcd2e48a72 (diff) | |
download | bitcoin-ddff3447f29b62d79a33f728791f42fa9436216e.tar.xz |
Merge #11997: [tests] util_tests.cpp: actually check ignored args
c99a3c32c8 [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
-rw-r--r-- | src/test/util_tests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index 6a02ccb5c1..55d60d95e9 100644 --- a/src/test/util_tests.cpp +++ b/src/test/util_tests.cpp @@ -121,7 +121,7 @@ BOOST_AUTO_TEST_CASE(util_ParseParameters) testArgs.ParseParameters(1, (char**)argv_test); BOOST_CHECK(testArgs.GetMapArgs().empty() && testArgs.GetMapMultiArgs().empty()); - testArgs.ParseParameters(5, (char**)argv_test); + testArgs.ParseParameters(7, (char**)argv_test); // expectation: -ignored is ignored (program name argument), // -a, -b and -ccc end up in map, -d ignored because it is after // a non-option argument (non-GNU option parsing) |