mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Merge b75f2ad72d into merged_master (Bitcoin PR #19660)
This commit is contained in:
commit
419fd4f90d
17 changed files with 53 additions and 73 deletions
|
|
@ -105,47 +105,24 @@ BOOST_AUTO_TEST_CASE(util_ParseHex)
|
|||
BOOST_AUTO_TEST_CASE(util_HexStr)
|
||||
{
|
||||
BOOST_CHECK_EQUAL(
|
||||
HexStr(ParseHex_expected, ParseHex_expected + sizeof(ParseHex_expected)),
|
||||
HexStr(ParseHex_expected),
|
||||
"04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f");
|
||||
|
||||
BOOST_CHECK_EQUAL(
|
||||
HexStr(ParseHex_expected + sizeof(ParseHex_expected),
|
||||
ParseHex_expected + sizeof(ParseHex_expected)),
|
||||
HexStr(Span<const unsigned char>(
|
||||
ParseHex_expected + sizeof(ParseHex_expected),
|
||||
ParseHex_expected + sizeof(ParseHex_expected))),
|
||||
"");
|
||||
|
||||
BOOST_CHECK_EQUAL(
|
||||
HexStr(ParseHex_expected, ParseHex_expected),
|
||||
HexStr(Span<const unsigned char>(ParseHex_expected, ParseHex_expected)),
|
||||
"");
|
||||
|
||||
std::vector<unsigned char> ParseHex_vec(ParseHex_expected, ParseHex_expected + 5);
|
||||
|
||||
BOOST_CHECK_EQUAL(
|
||||
HexStr(ParseHex_vec.rbegin(), ParseHex_vec.rend()),
|
||||
"b0fd8a6704"
|
||||
);
|
||||
|
||||
BOOST_CHECK_EQUAL(
|
||||
HexStr(std::reverse_iterator<const uint8_t *>(ParseHex_expected),
|
||||
std::reverse_iterator<const uint8_t *>(ParseHex_expected)),
|
||||
""
|
||||
);
|
||||
|
||||
BOOST_CHECK_EQUAL(
|
||||
HexStr(std::reverse_iterator<const uint8_t *>(ParseHex_expected + 1),
|
||||
std::reverse_iterator<const uint8_t *>(ParseHex_expected)),
|
||||
"04"
|
||||
);
|
||||
|
||||
BOOST_CHECK_EQUAL(
|
||||
HexStr(std::reverse_iterator<const uint8_t *>(ParseHex_expected + 5),
|
||||
std::reverse_iterator<const uint8_t *>(ParseHex_expected)),
|
||||
"b0fd8a6704"
|
||||
);
|
||||
|
||||
BOOST_CHECK_EQUAL(
|
||||
HexStr(std::reverse_iterator<const uint8_t *>(ParseHex_expected + 65),
|
||||
std::reverse_iterator<const uint8_t *>(ParseHex_expected)),
|
||||
"5f1df16b2b704c8a578d0bbaf74d385cde12c11ee50455f3c438ef4c3fbcf649b6de611feae06279a60939e028a8d65c10b73071a6f16719274855feb0fd8a6704"
|
||||
HexStr(ParseHex_vec),
|
||||
"04678afdb0"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -1023,7 +1000,7 @@ BOOST_FIXTURE_TEST_CASE(util_ArgsMerge, ArgsMergeTestingSetup)
|
|||
|
||||
unsigned char out_sha_bytes[CSHA256::OUTPUT_SIZE];
|
||||
out_sha.Finalize(out_sha_bytes);
|
||||
std::string out_sha_hex = HexStr(std::begin(out_sha_bytes), std::end(out_sha_bytes));
|
||||
std::string out_sha_hex = HexStr(out_sha_bytes);
|
||||
|
||||
// If check below fails, should manually dump the results with:
|
||||
//
|
||||
|
|
@ -1126,7 +1103,7 @@ BOOST_FIXTURE_TEST_CASE(util_ChainMerge, ChainMergeTestingSetup)
|
|||
|
||||
unsigned char out_sha_bytes[CSHA256::OUTPUT_SIZE];
|
||||
out_sha.Finalize(out_sha_bytes);
|
||||
std::string out_sha_hex = HexStr(std::begin(out_sha_bytes), std::end(out_sha_bytes));
|
||||
std::string out_sha_hex = HexStr(out_sha_bytes);
|
||||
|
||||
// If check below fails, should manually dump the results with:
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue