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,25 +77,25 @@ BOOST_AUTO_TEST_CASE(streams_serializedata_xor)
80
77
81
78
// Degenerate case
82
79
83
- key += ' \x00 ' ;
84
- key += ' \x00 ' ;
80
+ key. push_back ( ' \x00 ' ) ;
81
+ key. push_back ( ' \x00 ' ) ;
85
82
ds.Xor (key);
86
83
BOOST_CHECK_EQUAL (
87
84
std::string (expected_xor.begin (), expected_xor.end ()),
88
85
std::string (ds.begin (), ds.end ()));
89
86
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 ' ) ;
94
91
95
92
// Single character key
96
93
97
94
ds.clear ();
98
95
ds.insert (ds.begin (), in.begin (), in.end ());
99
96
key.clear ();
100
97
101
- key += ' \xff ' ;
98
+ key. push_back ( ' \xff ' ) ;
102
99
ds.Xor (key);
103
100
BOOST_CHECK_EQUAL (
104
101
std::string (expected_xor.begin (), expected_xor.end ()),
@@ -108,17 +105,17 @@ BOOST_AUTO_TEST_CASE(streams_serializedata_xor)
108
105
109
106
in.clear ();
110
107
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 ' ) ;
115
112
116
113
ds.clear ();
117
114
ds.insert (ds.begin (), in.begin (), in.end ());
118
115
119
116
key.clear ();
120
- key += ' \xff ' ;
121
- key += ' \x0f ' ;
117
+ key. push_back ( ' \xff ' ) ;
118
+ key. push_back ( ' \x0f ' ) ;
122
119
123
120
ds.Xor (key);
124
121
BOOST_CHECK_EQUAL (
0 commit comments