diff --git a/test/flat_tree_test.cpp b/test/flat_tree_test.cpp index e65b73a..e0cbf75 100644 --- a/test/flat_tree_test.cpp +++ b/test/flat_tree_test.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include @@ -132,12 +133,10 @@ int main () std::less, void> tree; typedef tree::container_type container_type; typedef tree::key_compare key_compare; - if (boost::has_trivial_destructor_after_move::value != + BOOST_STATIC_ASSERT_MSG ((boost::has_trivial_destructor_after_move::value == boost::has_trivial_destructor_after_move::value && - boost::has_trivial_destructor_after_move::value) { - std::cerr << "has_trivial_destructor_after_move(default allocator) test failed" << std::endl; - return 1; - } + boost::has_trivial_destructor_after_move::value) + , "has_trivial_destructor_after_move(default allocator) test failed"); } // std::allocator { @@ -145,12 +144,10 @@ int main () std::less, std::allocator > tree; typedef tree::container_type container_type; typedef tree::key_compare key_compare; - if (boost::has_trivial_destructor_after_move::value != + BOOST_STATIC_ASSERT_MSG( (boost::has_trivial_destructor_after_move::value == boost::has_trivial_destructor_after_move::value && - boost::has_trivial_destructor_after_move::value) { - std::cerr << "has_trivial_destructor_after_move(std::allocator) test failed" << std::endl; - return 1; - } + boost::has_trivial_destructor_after_move::value) + , "has_trivial_destructor_after_move(std::allocator) test failed"); } return 0; diff --git a/test/tree_test.cpp b/test/tree_test.cpp index e075596..16b6520 100644 --- a/test/tree_test.cpp +++ b/test/tree_test.cpp @@ -92,13 +92,10 @@ int main () typedef tree::allocator_type allocator_type; typedef boost::container::allocator_traits::pointer pointer; typedef tree::key_compare key_compare; - if (boost::has_trivial_destructor_after_move::value != + BOOST_STATIC_ASSERT_MSG((boost::has_trivial_destructor_after_move::value == boost::has_trivial_destructor_after_move::value && boost::has_trivial_destructor_after_move::value && - boost::has_trivial_destructor_after_move::value) { - std::cerr << "has_trivial_destructor_after_move(default allocator) test failed" << std::endl; - return 1; - } + boost::has_trivial_destructor_after_move::value), "has_trivial_destructor_after_move(default allocator) test failed"); } // std::allocator { @@ -106,13 +103,11 @@ int main () typedef tree::allocator_type allocator_type; typedef boost::container::allocator_traits::pointer pointer; typedef tree::key_compare key_compare; - if (boost::has_trivial_destructor_after_move::value != + BOOST_STATIC_ASSERT_MSG ((boost::has_trivial_destructor_after_move::value == boost::has_trivial_destructor_after_move::value && boost::has_trivial_destructor_after_move::value && - boost::has_trivial_destructor_after_move::value) { - std::cerr << "has_trivial_destructor_after_move(std::allocator) test failed" << std::endl; - return 1; - } + boost::has_trivial_destructor_after_move::value) + , "has_trivial_destructor_after_move(std::allocator) test failed"); } return 0;