diff options
author | Tor Lillqvist <tlillqvist@novell.com> | 2011-08-17 18:33:04 +0300 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@novell.com> | 2011-08-17 20:59:45 +0300 |
commit | 2495f15abb72cfcaea07fc20151b574e4d254df0 (patch) | |
tree | 1b67ea2506cdda5e9b0ab0d46d95119937fcc39e /sal/cppunittester | |
parent | Do not silently ignore exceptions when saving Libraries (diff) | |
download | core-2495f15abb72cfcaea07fc20151b574e4d254df0.tar.gz core-2495f15abb72cfcaea07fc20151b574e4d254df0.zip |
Do use _CrtDbgReport() in a _DEBUG (enable-dbgutil, non-pro) build
Diffstat (limited to 'sal/cppunittester')
-rw-r--r-- | sal/cppunittester/cppunittester.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx index b351870b6a22..78da5dd9cf7c 100644 --- a/sal/cppunittester/cppunittester.cxx +++ b/sal/cppunittester/cppunittester.cxx @@ -126,6 +126,14 @@ SAL_IMPLEMENT_MAIN() { //windows DWORD dwMode = SetErrorMode(SEM_NOGPFAULTERRORBOX); SetErrorMode(SEM_NOGPFAULTERRORBOX|dwMode); +#ifdef _DEBUG // These functions are present only in the debgging runtime + _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG|_CRTDBG_MODE_FILE); + _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); + _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG|_CRTDBG_MODE_FILE); + _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR); + _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG|_CRTDBG_MODE_FILE); + _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); +#endif #endif CppUnit::TestResult result; |