Skip to content

Commit e15e3a9

Browse files
practicalswiftMarcoFalke
authored andcommitted
Remove boost dependency (boost/assign/std/vector.hpp)
Github-Pull: #13545 Rebased-From: 962d8ee
1 parent 1062199 commit e15e3a9

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

src/test/streams_tests.cpp

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@
66
#include <support/allocators/zeroafterfree.h>
77
#include <test/test_bitcoin.h>
88

9-
#include <boost/assign/std/vector.hpp> // for 'operator+=()'
109
#include <boost/test/unit_test.hpp>
1110

12-
using namespace boost::assign; // bring 'operator+=()' into scope
13-
1411
BOOST_FIXTURE_TEST_SUITE(streams_tests, BasicTestingSetup)
1512

1613
BOOST_AUTO_TEST_CASE(streams_vector_writer)
@@ -80,25 +77,25 @@ BOOST_AUTO_TEST_CASE(streams_serializedata_xor)
8077

8178
// Degenerate case
8279

83-
key += '\x00';
84-
key += '\x00';
80+
key.push_back('\x00');
81+
key.push_back('\x00');
8582
ds.Xor(key);
8683
BOOST_CHECK_EQUAL(
8784
std::string(expected_xor.begin(), expected_xor.end()),
8885
std::string(ds.begin(), ds.end()));
8986

90-
in += '\x0f';
91-
in += '\xf0';
92-
expected_xor += '\xf0';
93-
expected_xor += '\x0f';
87+
in.push_back('\x0f');
88+
in.push_back('\xf0');
89+
expected_xor.push_back('\xf0');
90+
expected_xor.push_back('\x0f');
9491

9592
// Single character key
9693

9794
ds.clear();
9895
ds.insert(ds.begin(), in.begin(), in.end());
9996
key.clear();
10097

101-
key += '\xff';
98+
key.push_back('\xff');
10299
ds.Xor(key);
103100
BOOST_CHECK_EQUAL(
104101
std::string(expected_xor.begin(), expected_xor.end()),
@@ -108,17 +105,17 @@ BOOST_AUTO_TEST_CASE(streams_serializedata_xor)
108105

109106
in.clear();
110107
expected_xor.clear();
111-
in += '\xf0';
112-
in += '\x0f';
113-
expected_xor += '\x0f';
114-
expected_xor += '\x00';
108+
in.push_back('\xf0');
109+
in.push_back('\x0f');
110+
expected_xor.push_back('\x0f');
111+
expected_xor.push_back('\x00');
115112

116113
ds.clear();
117114
ds.insert(ds.begin(), in.begin(), in.end());
118115

119116
key.clear();
120-
key += '\xff';
121-
key += '\x0f';
117+
key.push_back('\xff');
118+
key.push_back('\x0f');
122119

123120
ds.Xor(key);
124121
BOOST_CHECK_EQUAL(

0 commit comments

Comments
 (0)