@@ -745,41 +745,44 @@ BOOST_AUTO_TEST_CASE(test_modify_value_through_iterator_with_const_qualifier) {
745745/* *
746746 * constructor
747747 */
748+
748749BOOST_AUTO_TEST_CASE (test_extreme_bucket_count_value_construction) {
749- TSL_RH_CHECK_THROW (
750+ // std::bad_alloc or std::length_error will be thrown depending on the
751+ // platform overcommit
752+ TSL_RH_CHECK_THROW_EITHER (
750753 (tsl::robin_map<int , int , std::hash<int >, std::equal_to<int >,
751754 std::allocator<std::pair<int , int >>, false ,
752755 tsl::rh::power_of_two_growth_policy<2 >>(
753756 std::numeric_limits<std::size_t >::max ())),
754- std::length_error);
757+ std::bad_alloc, std:: length_error);
755758
756- TSL_RH_CHECK_THROW (
759+ TSL_RH_CHECK_THROW_EITHER (
757760 (tsl::robin_map<int , int , std::hash<int >, std::equal_to<int >,
758761 std::allocator<std::pair<int , int >>, false ,
759762 tsl::rh::power_of_two_growth_policy<2 >>(
760763 std::numeric_limits<std::size_t >::max () / 2 + 1 )),
761- std::length_error);
764+ std::bad_alloc, std:: length_error);
762765
763- TSL_RH_CHECK_THROW (
766+ TSL_RH_CHECK_THROW_EITHER (
764767 (tsl::robin_map<int , int , std::hash<int >, std::equal_to<int >,
765768 std::allocator<std::pair<int , int >>, false ,
766769 tsl::rh::prime_growth_policy>(
767770 std::numeric_limits<std::size_t >::max ())),
768- std::length_error);
771+ std::bad_alloc, std:: length_error);
769772
770- TSL_RH_CHECK_THROW (
773+ TSL_RH_CHECK_THROW_EITHER (
771774 (tsl::robin_map<int , int , std::hash<int >, std::equal_to<int >,
772775 std::allocator<std::pair<int , int >>, false ,
773776 tsl::rh::prime_growth_policy>(
774777 std::numeric_limits<std::size_t >::max () / 2 )),
775- std::length_error);
778+ std::bad_alloc, std:: length_error);
776779
777- TSL_RH_CHECK_THROW (
780+ TSL_RH_CHECK_THROW_EITHER (
778781 (tsl::robin_map<int , int , std::hash<int >, std::equal_to<int >,
779782 std::allocator<std::pair<int , int >>, false ,
780783 tsl::rh::mod_growth_policy<>>(
781784 std::numeric_limits<std::size_t >::max ())),
782- std::length_error);
785+ std::bad_alloc, std:: length_error);
783786}
784787
785788BOOST_AUTO_TEST_CASE (test_range_construct) {
0 commit comments