Skip to content

Commit

Permalink
Update test/append_bool.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Nov 3, 2024
1 parent 67c3f3f commit d85fb2f
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion test/append_bool.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Peter Dimov.
// Copyright 2024 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

Expand Down Expand Up @@ -34,6 +34,15 @@ int main()
BOOST_TEST_EQ( h.result(), 1177189415 );
}

{
bool v[ 7 ] = {};

fnv1a_32 h;
hash_append_range( h, {}, v + 0, v + 7 );

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

{
std::vector<bool> v( 7 );

Expand All @@ -43,5 +52,14 @@ int main()
BOOST_TEST_EQ( h.result(), 1177189415 );
}

{
std::vector<bool> const v( 7 );

fnv1a_32 h;
hash_append_range( h, {}, v.begin(), v.end() );

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

return boost::report_errors();
}

0 comments on commit d85fb2f

Please sign in to comment.