diff --git a/include/boost/core/lightweight_test.hpp b/include/boost/core/lightweight_test.hpp index 5c4547a..b8f7d88 100644 --- a/include/boost/core/lightweight_test.hpp +++ b/include/boost/core/lightweight_test.hpp @@ -23,10 +23,10 @@ // #include -#include #include #include #include +#include #include #include @@ -45,11 +45,14 @@ namespace detail class test_result { public: test_result() - : report_errors_called_(false) + : report_(false) , errors_(0) { } ~test_result() { - BOOST_ASSERT(report_errors_called_); + if (!report_) { + BOOST_LIGHTWEIGHT_TEST_OSTREAM << "report_errors() not called" << std::endl; + std::abort(); + } } void error() { @@ -57,12 +60,12 @@ public: } int done() { - report_errors_called_ = true; + report_ = true; return errors_; } private: - bool report_errors_called_; + bool report_; int errors_; };