mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
Make Bech32 LocateErrors return error list rather than using out-arg
This commit is contained in:
@@ -97,8 +97,7 @@ BOOST_AUTO_TEST_CASE(bech32_testvectors_invalid)
|
||||
const auto& err = ERRORS[i];
|
||||
const auto dec = bech32::Decode(str);
|
||||
BOOST_CHECK(dec.encoding == bech32::Encoding::INVALID);
|
||||
std::vector<int> error_locations;
|
||||
std::string error = bech32::LocateErrors(str, error_locations);
|
||||
auto [error, error_locations] = bech32::LocateErrors(str);
|
||||
BOOST_CHECK_EQUAL(err.first, error);
|
||||
BOOST_CHECK(err.second == error_locations);
|
||||
i++;
|
||||
@@ -150,8 +149,7 @@ BOOST_AUTO_TEST_CASE(bech32m_testvectors_invalid)
|
||||
const auto& err = ERRORS[i];
|
||||
const auto dec = bech32::Decode(str);
|
||||
BOOST_CHECK(dec.encoding == bech32::Encoding::INVALID);
|
||||
std::vector<int> error_locations;
|
||||
std::string error = bech32::LocateErrors(str, error_locations);
|
||||
auto [error, error_locations] = bech32::LocateErrors(str);
|
||||
BOOST_CHECK_EQUAL(err.first, error);
|
||||
BOOST_CHECK(err.second == error_locations);
|
||||
i++;
|
||||
|
||||
Reference in New Issue
Block a user