diff options
author | Samuel Dobson <dobsonsa68@gmail.com> | 2021-12-04 12:49:27 +1300 |
---|---|---|
committer | Samuel Dobson <dobsonsa68@gmail.com> | 2021-12-06 14:17:41 +1300 |
commit | a4fe70171b6fa570eda71d86b59d0fb24c2f0614 (patch) | |
tree | f2039c5b04f96fe6a4b347a2dd8ee034198b0677 /src/test | |
parent | 2fa4fd196176160a5ad0a25da173ff93252b8103 (diff) |
Make Bech32 LocateErrors return error list rather than using out-arg
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/bech32_tests.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/test/bech32_tests.cpp b/src/test/bech32_tests.cpp index 5d851a9735..51a1d1199e 100644 --- a/src/test/bech32_tests.cpp +++ b/src/test/bech32_tests.cpp @@ -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++; |