Skip to content

Commit

Permalink
Update append_string_view.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Nov 4, 2024
1 parent 26c8225 commit 4b37ab1
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions test/append_string_view.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017, 2024 Peter Dimov.
// Copyright 2017, 2024 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

Expand All @@ -13,28 +13,6 @@
#include <string_view>
#endif

template<class Hash, class Flavor, class T, class R> void test_string_view( R r )
{
unsigned char w[] = { 1, 2, 3, 4 };
T v( w, w + sizeof(w) / sizeof(w[0]) );

Flavor f;

{
Hash h;
boost::hash2::hash_append( h, f, v );

BOOST_TEST_EQ( h.result(), r );
}

{
Hash h;
boost::hash2::hash_append_sized_range( h, f, v.begin(), v.end() );

BOOST_TEST_EQ( h.result(), r );
}
}

template<class Hash, class Flavor, class T, class R> void test( R r )
{
std::basic_string<T> str{ 1, 2, 3, 4 };
Expand Down

0 comments on commit 4b37ab1

Please sign in to comment.