mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-29 19:07:15 +02:00
@ -83,7 +83,7 @@ namespace boost {
|
||||
1610612741ul, 3221225473ul, 4294967291ul };
|
||||
|
||||
template<typename T>
|
||||
std::ptrdiff_t const prime_list_template<T>::length = 28;
|
||||
std::ptrdiff_t const prime_list_template<T>::length = 40;
|
||||
|
||||
typedef prime_list_template<std::size_t> prime_list;
|
||||
|
||||
|
@ -37,4 +37,5 @@ test-suite unordered
|
||||
[ run rehash_tests.cpp ]
|
||||
[ run equality_tests.cpp ]
|
||||
[ run swap_tests.cpp : : : <define>BOOST_UNORDERED_SWAP_METHOD=2 ]
|
||||
[ run detail_tests.cpp ]
|
||||
;
|
||||
|
27
test/unordered/detail_tests.cpp
Normal file
27
test/unordered/detail_tests.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
|
||||
// Copyright 2009 Daniel James.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// Test some of the library's implementation details.
|
||||
|
||||
#include <boost/unordered_set.hpp>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <boost/range.hpp>
|
||||
|
||||
int main() {
|
||||
|
||||
// Test that the prime list has the right length.
|
||||
//
|
||||
// It would have been better to automatically set the length in the header
|
||||
// but that doesn't work on some older compilers.
|
||||
|
||||
BOOST_TEST_EQ(
|
||||
boost::end(boost::unordered_detail::prime_list::value) -
|
||||
boost::begin(boost::unordered_detail::prime_list::value),
|
||||
boost::unordered_detail::prime_list::length);
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
Reference in New Issue
Block a user