forked from boostorg/unordered
Add hash_is_avalanching_test.cpp
This commit is contained in:
@ -139,6 +139,8 @@ build_foa erase_if ;
|
|||||||
build_foa scary_tests ;
|
build_foa scary_tests ;
|
||||||
build_foa init_type_insert_tests ;
|
build_foa init_type_insert_tests ;
|
||||||
|
|
||||||
|
run unordered/hash_is_avalanching_test.cpp : : : $(CPP11) ;
|
||||||
|
|
||||||
run exception/constructor_exception_tests.cpp : : : $(CPP11) <define>BOOST_UNORDERED_FOA_TESTS : foa_constructor_exception_tests ;
|
run exception/constructor_exception_tests.cpp : : : $(CPP11) <define>BOOST_UNORDERED_FOA_TESTS : foa_constructor_exception_tests ;
|
||||||
run exception/copy_exception_tests.cpp : : : $(CPP11) <define>BOOST_UNORDERED_FOA_TESTS : foa_copy_exception_tests ;
|
run exception/copy_exception_tests.cpp : : : $(CPP11) <define>BOOST_UNORDERED_FOA_TESTS : foa_copy_exception_tests ;
|
||||||
run exception/assign_exception_tests.cpp : : : $(CPP11) <define>BOOST_UNORDERED_FOA_TESTS : foa_assign_exception_tests ;
|
run exception/assign_exception_tests.cpp : : : $(CPP11) <define>BOOST_UNORDERED_FOA_TESTS : foa_assign_exception_tests ;
|
||||||
|
25
test/unordered/hash_is_avalanching_test.cpp
Normal file
25
test/unordered/hash_is_avalanching_test.cpp
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Copyright 2022 Peter Dimov
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
#include <boost/unordered/hash_traits.hpp>
|
||||||
|
#include <boost/core/lightweight_test_trait.hpp>
|
||||||
|
|
||||||
|
struct X1
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
struct X2
|
||||||
|
{
|
||||||
|
typedef void is_avalanching;
|
||||||
|
};
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
using boost::unordered::hash_is_avalanching;
|
||||||
|
|
||||||
|
BOOST_TEST_TRAIT_FALSE((hash_is_avalanching<X1>));
|
||||||
|
BOOST_TEST_TRAIT_TRUE((hash_is_avalanching<X2>));
|
||||||
|
|
||||||
|
return boost::report_errors();
|
||||||
|
}
|
Reference in New Issue
Block a user