Fix uninit memory in Clara tests

This commit is contained in:
Martin Hořeňovský 2022-04-24 12:25:46 +02:00
parent 5baa29b6b9
commit 07cdef2096
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A

View File

@ -52,12 +52,11 @@ TEST_CASE("Clara::Arg supports single-arg parse the way Opt does", "[clara][arg]
} }
TEST_CASE("Clara::Opt supports accept-many lambdas", "[clara][opt]") { TEST_CASE("Clara::Opt supports accept-many lambdas", "[clara][opt]") {
std::string name;
using namespace Catch::Clara; using namespace Catch::Clara;
std::vector<std::string> res; std::vector<std::string> res;
const auto push_to_res = [&](std::string const& s) { const auto push_to_res = [&](std::string const& s) {
res.push_back(s); res.push_back(s);
return ParserResult::ok(); return ParserResult::ok( ParseResultType::Matched );
}; };
SECTION("Parsing fails on multiple options without accept_many") { SECTION("Parsing fails on multiple options without accept_many") {