@@ -105,47 +105,24 @@ BOOST_AUTO_TEST_CASE(util_ParseHex)
105
105
BOOST_AUTO_TEST_CASE (util_HexStr)
106
106
{
107
107
BOOST_CHECK_EQUAL (
108
- HexStr (ParseHex_expected, ParseHex_expected + sizeof (ParseHex_expected) ),
108
+ HexStr (ParseHex_expected),
109
109
" 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f" );
110
110
111
111
BOOST_CHECK_EQUAL (
112
- HexStr (ParseHex_expected + sizeof (ParseHex_expected),
113
- ParseHex_expected + sizeof (ParseHex_expected)),
112
+ HexStr (Span<const unsigned char >(
113
+ ParseHex_expected + sizeof (ParseHex_expected),
114
+ ParseHex_expected + sizeof (ParseHex_expected))),
114
115
" " );
115
116
116
117
BOOST_CHECK_EQUAL (
117
- HexStr (ParseHex_expected, ParseHex_expected),
118
+ HexStr (Span< const unsigned char >( ParseHex_expected, ParseHex_expected) ),
118
119
" " );
119
120
120
121
std::vector<unsigned char > ParseHex_vec (ParseHex_expected, ParseHex_expected + 5 );
121
122
122
123
BOOST_CHECK_EQUAL (
123
- HexStr (ParseHex_vec.rbegin (), ParseHex_vec.rend ()),
124
- " b0fd8a6704"
125
- );
126
-
127
- BOOST_CHECK_EQUAL (
128
- HexStr (std::reverse_iterator<const uint8_t *>(ParseHex_expected),
129
- std::reverse_iterator<const uint8_t *>(ParseHex_expected)),
130
- " "
131
- );
132
-
133
- BOOST_CHECK_EQUAL (
134
- HexStr (std::reverse_iterator<const uint8_t *>(ParseHex_expected + 1 ),
135
- std::reverse_iterator<const uint8_t *>(ParseHex_expected)),
136
- " 04"
137
- );
138
-
139
- BOOST_CHECK_EQUAL (
140
- HexStr (std::reverse_iterator<const uint8_t *>(ParseHex_expected + 5 ),
141
- std::reverse_iterator<const uint8_t *>(ParseHex_expected)),
142
- " b0fd8a6704"
143
- );
144
-
145
- BOOST_CHECK_EQUAL (
146
- HexStr (std::reverse_iterator<const uint8_t *>(ParseHex_expected + 65 ),
147
- std::reverse_iterator<const uint8_t *>(ParseHex_expected)),
148
- " 5f1df16b2b704c8a578d0bbaf74d385cde12c11ee50455f3c438ef4c3fbcf649b6de611feae06279a60939e028a8d65c10b73071a6f16719274855feb0fd8a6704"
124
+ HexStr (ParseHex_vec),
125
+ " 04678afdb0"
149
126
);
150
127
}
151
128
@@ -1022,7 +999,7 @@ BOOST_FIXTURE_TEST_CASE(util_ArgsMerge, ArgsMergeTestingSetup)
1022
999
1023
1000
unsigned char out_sha_bytes[CSHA256::OUTPUT_SIZE];
1024
1001
out_sha.Finalize (out_sha_bytes);
1025
- std::string out_sha_hex = HexStr (std::begin ( out_sha_bytes), std::end (out_sha_bytes) );
1002
+ std::string out_sha_hex = HexStr (out_sha_bytes);
1026
1003
1027
1004
// If check below fails, should manually dump the results with:
1028
1005
//
@@ -1125,7 +1102,7 @@ BOOST_FIXTURE_TEST_CASE(util_ChainMerge, ChainMergeTestingSetup)
1125
1102
1126
1103
unsigned char out_sha_bytes[CSHA256::OUTPUT_SIZE];
1127
1104
out_sha.Finalize (out_sha_bytes);
1128
- std::string out_sha_hex = HexStr (std::begin ( out_sha_bytes), std::end (out_sha_bytes) );
1105
+ std::string out_sha_hex = HexStr (out_sha_bytes);
1129
1106
1130
1107
// If check below fails, should manually dump the results with:
1131
1108
//
0 commit comments