1111#include < test/util/setup_common.h>
1212#include < util/strencodings.h>
1313
14+ #include < algorithm>
1415#include < array>
1516#include < cstddef>
1617#include < cstdint>
@@ -62,9 +63,9 @@ void TestBIP324PacketVector(
6263 BOOST_CHECK (cipher);
6364
6465 // Compare session variables.
65- BOOST_CHECK (Span{ out_session_id} == cipher.GetSessionID ());
66- BOOST_CHECK (Span{ mid_send_garbage} == cipher.GetSendGarbageTerminator ());
67- BOOST_CHECK (Span{ mid_recv_garbage} == cipher.GetReceiveGarbageTerminator ());
66+ BOOST_CHECK (std::ranges::equal ( out_session_id, cipher.GetSessionID () ));
67+ BOOST_CHECK (std::ranges::equal ( mid_send_garbage, cipher.GetSendGarbageTerminator () ));
68+ BOOST_CHECK (std::ranges::equal ( mid_recv_garbage, cipher.GetReceiveGarbageTerminator () ));
6869
6970 // Vector of encrypted empty messages, encrypted in order to seek to the right position.
7071 std::vector<std::vector<std::byte>> dummies (in_idx);
@@ -89,7 +90,7 @@ void TestBIP324PacketVector(
8990 BOOST_CHECK (out_ciphertext == ciphertext);
9091 } else {
9192 BOOST_CHECK (ciphertext.size () >= out_ciphertext_endswith.size ());
92- BOOST_CHECK (Span{ out_ciphertext_endswith} == Span{ciphertext}.last (out_ciphertext_endswith.size ()));
93+ BOOST_CHECK (std::ranges::equal ( out_ciphertext_endswith, Span{ciphertext}.last (out_ciphertext_endswith.size () )));
9394 }
9495
9596 for (unsigned error = 0 ; error <= 12 ; ++error) {
@@ -109,9 +110,9 @@ void TestBIP324PacketVector(
109110 BOOST_CHECK (dec_cipher);
110111
111112 // Compare session variables.
112- BOOST_CHECK ((Span{ out_session_id} == dec_cipher.GetSessionID ()) == (error != 1 ));
113- BOOST_CHECK ((Span{ mid_send_garbage} == dec_cipher.GetSendGarbageTerminator ()) == (error != 1 ));
114- BOOST_CHECK ((Span{ mid_recv_garbage} == dec_cipher.GetReceiveGarbageTerminator ()) == (error != 1 ));
113+ BOOST_CHECK (std::ranges::equal ( out_session_id, dec_cipher.GetSessionID ()) == (error != 1 ));
114+ BOOST_CHECK (std::ranges::equal ( mid_send_garbage, dec_cipher.GetSendGarbageTerminator ()) == (error != 1 ));
115+ BOOST_CHECK (std::ranges::equal ( mid_recv_garbage, dec_cipher.GetReceiveGarbageTerminator ()) == (error != 1 ));
115116
116117 // Seek to the numbered packet.
117118 if (in_idx == 0 && error == 12 ) continue ;
0 commit comments