]> granicus.if.org Git - pdns/commitdiff
make sure decoded is not filled by previous base64encode test
authorKees Monshouwer <mind04@monshouwer.org>
Sat, 3 Jan 2015 20:55:13 +0000 (21:55 +0100)
committermind04 <mind04@monshouwer.org>
Sat, 3 Jan 2015 22:59:26 +0000 (23:59 +0100)
pdns/test-base64_cc.cc

index b9be69263d25b5adc891e6ac52f96e9a234c4028..e1b536a041cfde89f3c657a0b45d030643fed70d 100644 (file)
@@ -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);
   }
 }