From: Kees Monshouwer Date: Sat, 3 Jan 2015 20:55:13 +0000 (+0100) Subject: make sure decoded is not filled by previous base64encode test X-Git-Tag: rec-3.7.0-rc1~39^2~1^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=032edd214ba0324d51fddf3d8eafb62d5f2ed11a;p=thirdparty%2Fpdns.git make sure decoded is not filled by previous base64encode test --- diff --git a/pdns/test-base64_cc.cc b/pdns/test-base64_cc.cc index b9be69263d..e1b536a041 100644 --- a/pdns/test-base64_cc.cc +++ b/pdns/test-base64_cc.cc @@ -62,7 +62,8 @@ BOOST_AUTO_TEST_CASE(test_Base64_Encode) { BOOST_FOREACH(const cases_t::value_type& val, cases) { std::string encoded = Base64Encode(val.first), decoded; BOOST_CHECK_EQUAL(encoded, val.second); - B64Decode(encoded, decoded); + decoded.clear(); + B64Decode(val.second, decoded); BOOST_CHECK_EQUAL(decoded, val.first); } }