6
6
#include < support/allocators/zeroafterfree.h>
7
7
#include < test/test_bitcoin.h>
8
8
9
- #include < boost/assign/std/vector.hpp> // for 'operator+=()'
10
9
#include < boost/test/unit_test.hpp>
11
10
12
- using namespace boost ::assign; // bring 'operator+=()' into scope
13
-
14
11
BOOST_FIXTURE_TEST_SUITE (streams_tests, BasicTestingSetup)
15
12
16
13
BOOST_AUTO_TEST_CASE(streams_vector_writer)
@@ -80,22 +77,25 @@ BOOST_AUTO_TEST_CASE(streams_serializedata_xor)
80
77
81
78
// Degenerate case
82
79
83
- key += ' \x00 ' ,' \x00 ' ;
80
+ key.push_back (' \x00 ' );
81
+ key.push_back (' \x00 ' );
84
82
ds.Xor (key);
85
83
BOOST_CHECK_EQUAL (
86
84
std::string (expected_xor.begin (), expected_xor.end ()),
87
85
std::string (ds.begin (), ds.end ()));
88
86
89
- in += ' \x0f ' ,' \xf0 ' ;
90
- expected_xor += ' \xf0 ' ,' \x0f ' ;
87
+ in.push_back (' \x0f ' );
88
+ in.push_back (' \xf0 ' );
89
+ expected_xor.push_back (' \xf0 ' );
90
+ expected_xor.push_back (' \x0f ' );
91
91
92
92
// Single character key
93
93
94
94
ds.clear ();
95
95
ds.insert (ds.begin (), in.begin (), in.end ());
96
96
key.clear ();
97
97
98
- key += ' \xff ' ;
98
+ key. push_back ( ' \xff ' ) ;
99
99
ds.Xor (key);
100
100
BOOST_CHECK_EQUAL (
101
101
std::string (expected_xor.begin (), expected_xor.end ()),
@@ -105,14 +105,17 @@ BOOST_AUTO_TEST_CASE(streams_serializedata_xor)
105
105
106
106
in.clear ();
107
107
expected_xor.clear ();
108
- in += ' \xf0 ' ,' \x0f ' ;
109
- expected_xor += ' \x0f ' ,' \x00 ' ;
108
+ in.push_back (' \xf0 ' );
109
+ in.push_back (' \x0f ' );
110
+ expected_xor.push_back (' \x0f ' );
111
+ expected_xor.push_back (' \x00 ' );
110
112
111
113
ds.clear ();
112
114
ds.insert (ds.begin (), in.begin (), in.end ());
113
115
114
116
key.clear ();
115
- key += ' \xff ' ,' \x0f ' ;
117
+ key.push_back (' \xff ' );
118
+ key.push_back (' \x0f ' );
116
119
117
120
ds.Xor (key);
118
121
BOOST_CHECK_EQUAL (
0 commit comments