Remember to disable exceptions before checking final value

This commit is contained in:
Daniel James
2017-05-05 00:46:07 +01:00
parent 47a8c3fc67
commit 6ef17a0f0e
8 changed files with 58 additions and 9 deletions

View File

@@ -5,8 +5,8 @@
#include "./containers.hpp"
#include "../helpers/random_values.hpp"
#include "../helpers/invariants.hpp"
#include "../helpers/random_values.hpp"
#include "../helpers/tracker.hpp"
template <typename T> inline void avoid_unused_warning(T const&) {}
@@ -20,6 +20,8 @@ template <class T> struct copy_test1 : public test::exception_base
void run() const
{
T y(x);
DISABLE_EXCEPTIONS;
BOOST_TEST(y.empty());
test::check_equivalent_keys(y);
}
@@ -35,6 +37,8 @@ template <class T> struct copy_test2 : public test::exception_base
void run() const
{
T y(x);
DISABLE_EXCEPTIONS;
test::check_container(y, this->values);
test::check_equivalent_keys(y);
}
@@ -50,6 +54,8 @@ template <class T> struct copy_test3 : public test::exception_base
void run() const
{
T y(x);
DISABLE_EXCEPTIONS;
test::check_container(y, this->values);
test::check_equivalent_keys(y);
}
@@ -66,6 +72,8 @@ template <class T> struct copy_with_allocator_test : public test::exception_base
void run() const
{
T y(x, allocator);
DISABLE_EXCEPTIONS;
test::check_container(y, this->values);
test::check_equivalent_keys(y);
}