diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/base32_tests.cpp | 4 | ||||
-rw-r--r-- | src/test/base64_tests.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/test/base32_tests.cpp b/src/test/base32_tests.cpp index 5fab7f0d1e..8a44e65165 100644 --- a/src/test/base32_tests.cpp +++ b/src/test/base32_tests.cpp @@ -22,7 +22,9 @@ BOOST_AUTO_TEST_CASE(base32_testvectors) BOOST_CHECK_EQUAL(strEnc, vstrOut[i]); strEnc = EncodeBase32(vstrIn[i], false); BOOST_CHECK_EQUAL(strEnc, vstrOutNoPadding[i]); - std::string strDec = DecodeBase32(vstrOut[i]); + bool invalid; + std::string strDec = DecodeBase32(vstrOut[i], &invalid); + BOOST_CHECK(!invalid); BOOST_CHECK_EQUAL(strDec, vstrIn[i]); } diff --git a/src/test/base64_tests.cpp b/src/test/base64_tests.cpp index 6ee1b83691..04b5185653 100644 --- a/src/test/base64_tests.cpp +++ b/src/test/base64_tests.cpp @@ -19,7 +19,9 @@ BOOST_AUTO_TEST_CASE(base64_testvectors) { std::string strEnc = EncodeBase64(vstrIn[i]); BOOST_CHECK_EQUAL(strEnc, vstrOut[i]); - std::string strDec = DecodeBase64(strEnc); + bool invalid; + std::string strDec = DecodeBase64(strEnc, &invalid); + BOOST_CHECK(!invalid); BOOST_CHECK_EQUAL(strDec, vstrIn[i]); } |