diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/fuzz/asmap.cpp | 2 | ||||
-rw-r--r-- | src/test/fuzz/utxo_snapshot.cpp | 2 | ||||
-rw-r--r-- | src/test/key_io_tests.cpp | 2 | ||||
-rw-r--r-- | src/test/util_tests.cpp | 6 |
4 files changed, 5 insertions, 7 deletions
diff --git a/src/test/fuzz/asmap.cpp b/src/test/fuzz/asmap.cpp index d402f8632c..c5e9c56049 100644 --- a/src/test/fuzz/asmap.cpp +++ b/src/test/fuzz/asmap.cpp @@ -49,7 +49,7 @@ FUZZ_TARGET(asmap) CNetAddr net_addr; if (ipv6) { assert(addr_size == ADDR_IPV6_SIZE); - net_addr.SetLegacyIPv6(Span<const uint8_t>(addr_data, addr_size)); + net_addr.SetLegacyIPv6({addr_data, addr_size}); } else { assert(addr_size == ADDR_IPV4_SIZE); in_addr ipv4; diff --git a/src/test/fuzz/utxo_snapshot.cpp b/src/test/fuzz/utxo_snapshot.cpp index 8d2a06f11a..d625403fa0 100644 --- a/src/test/fuzz/utxo_snapshot.cpp +++ b/src/test/fuzz/utxo_snapshot.cpp @@ -38,7 +38,7 @@ FUZZ_TARGET_INIT(utxo_snapshot, initialize_chain) { CAutoFile outfile{fsbridge::fopen(snapshot_path, "wb"), SER_DISK, CLIENT_VERSION}; const auto file_data{ConsumeRandomLengthByteVector(fuzzed_data_provider)}; - outfile << Span<const uint8_t>{file_data}; + outfile << Span{file_data}; } const auto ActivateFuzzedSnapshot{[&] { diff --git a/src/test/key_io_tests.cpp b/src/test/key_io_tests.cpp index 0361618c82..02268dbcf5 100644 --- a/src/test/key_io_tests.cpp +++ b/src/test/key_io_tests.cpp @@ -46,7 +46,7 @@ BOOST_AUTO_TEST_CASE(key_io_valid_parse) privkey = DecodeSecret(exp_base58string); BOOST_CHECK_MESSAGE(privkey.IsValid(), "!IsValid:" + strTest); BOOST_CHECK_MESSAGE(privkey.IsCompressed() == isCompressed, "compressed mismatch:" + strTest); - BOOST_CHECK_MESSAGE(Span<const uint8_t>{privkey} == Span<const uint8_t>{exp_payload}, "key mismatch:" + strTest); + BOOST_CHECK_MESSAGE(Span{privkey} == Span{exp_payload}, "key mismatch:" + strTest); // Private key must be invalid public key destination = DecodeDestination(exp_base58string); diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index 76a690fd28..9540cead24 100644 --- a/src/test/util_tests.cpp +++ b/src/test/util_tests.cpp @@ -142,13 +142,11 @@ BOOST_AUTO_TEST_CASE(util_HexStr) "04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f"); BOOST_CHECK_EQUAL( - HexStr(Span<const unsigned char>( - ParseHex_expected + sizeof(ParseHex_expected), - ParseHex_expected + sizeof(ParseHex_expected))), + HexStr(Span{ParseHex_expected}.last(0)), ""); BOOST_CHECK_EQUAL( - HexStr(Span<const unsigned char>(ParseHex_expected, ParseHex_expected)), + HexStr(Span{ParseHex_expected}.first(0)), ""); { |