From b5c178ef0bafa571a780f20bbbb75b114fe81973 Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Thu, 25 Apr 2019 08:13:48 -0400 Subject: [PATCH] Increase the size of test type --- test/default_allocator_test.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/default_allocator_test.cpp b/test/default_allocator_test.cpp index 855b5bb..5c1d657 100644 --- a/test/default_allocator_test.cpp +++ b/test/default_allocator_test.cpp @@ -10,11 +10,14 @@ Distributed under the Boost Software License, Version 1.0. class type { public: - explicit type(int) { } + explicit type(double value) + : value_(value) { } private: type(const type&); type& operator=(const type&); + + double value_; }; void test_value_type() @@ -157,7 +160,7 @@ void test_allocate() a.deallocate(p, 1); p = a.allocate(0); a.deallocate(p, 0); - BOOST_TEST_THROWS(a.allocate(a.max_size()), std::bad_alloc); + BOOST_TEST_THROWS(a.allocate(a.max_size() + 1), std::bad_alloc); } void test_allocate_deallocate()