mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 06:21:00 +00:00
Make sure that Crash Reporter is not invoked on death tests.
This commit is contained in:
parent
45397e5046
commit
59a462c67d
@ -26,6 +26,8 @@
|
||||
*/
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <csignal>
|
||||
#include <cstdlib>
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <windows.h>
|
||||
@ -33,7 +35,10 @@
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
#ifdef _WIN32
|
||||
#if defined(__APPLE__)
|
||||
// This ensures that Crash Reporter is not invoked on death tests.
|
||||
std::signal(SIGABRT, std::exit);
|
||||
#elif defined(_WIN32)
|
||||
// Don't display any error dialogs. This also suppresses message boxes
|
||||
// on assertion failures in MinGW where _set_error_mode/CrtSetReportMode
|
||||
// doesn't help.
|
||||
|
Loading…
Reference in New Issue
Block a user