forked from boostorg/core
Suppress MSVC error dialogs and add test for report_errors()
This commit is contained in:
1 parent
f2638b6d64
commit
76c3538315
3 files changed
+21
-2
No files matched your search
@@ -46,11 +46,15 @@ class test_result {
|
||||
public:
|
||||
test_result()
|
||||
: report_(false)
|
||||
, errors_(0) { }
|
||||
, errors_(0) {
|
||||
#ifdef BOOST_MSVC
|
||||
::_set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
|
||||
#endif
|
||||
}
|
||||
|
||||
~test_result() {
|
||||
if (!report_) {
|
||||
BOOST_LIGHTWEIGHT_TEST_OSTREAM << "report_errors() not called" << std::endl;
|
||||
BOOST_LIGHTWEIGHT_TEST_OSTREAM << "main() should return report_errors()" << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user