mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 12:22:39 -03:00
Remove boost dependency (boost/assign/std/vector.hpp)
This commit is contained in:
parent
c6fd0df4ef
commit
962d8eed5b
2 changed files with 13 additions and 17 deletions
|
@ -6,11 +6,8 @@
|
||||||
#include <support/allocators/zeroafterfree.h>
|
#include <support/allocators/zeroafterfree.h>
|
||||||
#include <test/test_bitcoin.h>
|
#include <test/test_bitcoin.h>
|
||||||
|
|
||||||
#include <boost/assign/std/vector.hpp> // for 'operator+=()'
|
|
||||||
#include <boost/test/unit_test.hpp>
|
#include <boost/test/unit_test.hpp>
|
||||||
|
|
||||||
using namespace boost::assign; // bring 'operator+=()' into scope
|
|
||||||
|
|
||||||
BOOST_FIXTURE_TEST_SUITE(streams_tests, BasicTestingSetup)
|
BOOST_FIXTURE_TEST_SUITE(streams_tests, BasicTestingSetup)
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(streams_vector_writer)
|
BOOST_AUTO_TEST_CASE(streams_vector_writer)
|
||||||
|
@ -80,17 +77,17 @@ BOOST_AUTO_TEST_CASE(streams_serializedata_xor)
|
||||||
|
|
||||||
// Degenerate case
|
// Degenerate case
|
||||||
|
|
||||||
key += '\x00';
|
key.push_back('\x00');
|
||||||
key += '\x00';
|
key.push_back('\x00');
|
||||||
ds.Xor(key);
|
ds.Xor(key);
|
||||||
BOOST_CHECK_EQUAL(
|
BOOST_CHECK_EQUAL(
|
||||||
std::string(expected_xor.begin(), expected_xor.end()),
|
std::string(expected_xor.begin(), expected_xor.end()),
|
||||||
std::string(ds.begin(), ds.end()));
|
std::string(ds.begin(), ds.end()));
|
||||||
|
|
||||||
in += '\x0f';
|
in.push_back('\x0f');
|
||||||
in += '\xf0';
|
in.push_back('\xf0');
|
||||||
expected_xor += '\xf0';
|
expected_xor.push_back('\xf0');
|
||||||
expected_xor += '\x0f';
|
expected_xor.push_back('\x0f');
|
||||||
|
|
||||||
// Single character key
|
// Single character key
|
||||||
|
|
||||||
|
@ -98,7 +95,7 @@ BOOST_AUTO_TEST_CASE(streams_serializedata_xor)
|
||||||
ds.insert(ds.begin(), in.begin(), in.end());
|
ds.insert(ds.begin(), in.begin(), in.end());
|
||||||
key.clear();
|
key.clear();
|
||||||
|
|
||||||
key += '\xff';
|
key.push_back('\xff');
|
||||||
ds.Xor(key);
|
ds.Xor(key);
|
||||||
BOOST_CHECK_EQUAL(
|
BOOST_CHECK_EQUAL(
|
||||||
std::string(expected_xor.begin(), expected_xor.end()),
|
std::string(expected_xor.begin(), expected_xor.end()),
|
||||||
|
@ -108,17 +105,17 @@ BOOST_AUTO_TEST_CASE(streams_serializedata_xor)
|
||||||
|
|
||||||
in.clear();
|
in.clear();
|
||||||
expected_xor.clear();
|
expected_xor.clear();
|
||||||
in += '\xf0';
|
in.push_back('\xf0');
|
||||||
in += '\x0f';
|
in.push_back('\x0f');
|
||||||
expected_xor += '\x0f';
|
expected_xor.push_back('\x0f');
|
||||||
expected_xor += '\x00';
|
expected_xor.push_back('\x00');
|
||||||
|
|
||||||
ds.clear();
|
ds.clear();
|
||||||
ds.insert(ds.begin(), in.begin(), in.end());
|
ds.insert(ds.begin(), in.begin(), in.end());
|
||||||
|
|
||||||
key.clear();
|
key.clear();
|
||||||
key += '\xff';
|
key.push_back('\xff');
|
||||||
key += '\x0f';
|
key.push_back('\x0f');
|
||||||
|
|
||||||
ds.Xor(key);
|
ds.Xor(key);
|
||||||
BOOST_CHECK_EQUAL(
|
BOOST_CHECK_EQUAL(
|
||||||
|
|
|
@ -53,7 +53,6 @@ EXPECTED_BOOST_INCLUDES=(
|
||||||
boost/algorithm/string/predicate.hpp
|
boost/algorithm/string/predicate.hpp
|
||||||
boost/algorithm/string/replace.hpp
|
boost/algorithm/string/replace.hpp
|
||||||
boost/algorithm/string/split.hpp
|
boost/algorithm/string/split.hpp
|
||||||
boost/assign/std/vector.hpp
|
|
||||||
boost/bind.hpp
|
boost/bind.hpp
|
||||||
boost/chrono/chrono.hpp
|
boost/chrono/chrono.hpp
|
||||||
boost/date_time/posix_time/posix_time.hpp
|
boost/date_time/posix_time/posix_time.hpp
|
||||||
|
|
Loading…
Reference in a new issue