1 // Formatting library for C++ - test main function.
3 // Copyright (c) 2012 - present, Victor Zverovich
4 // All rights reserved.
6 // For the license information refer to format.h.
10 #include "gtest/gtest.h"
20 int main(int argc
, char** argv
) {
22 // Don't display any error dialogs. This also suppresses message boxes
23 // on assertion failures in MinGW where _set_error_mode/CrtSetReportMode
25 SetErrorMode(SEM_FAILCRITICALERRORS
| SEM_NOGPFAULTERRORBOX
|
26 SEM_NOOPENFILEERRORBOX
);
29 // Disable message boxes on assertion failures.
30 _CrtSetReportMode(_CRT_ERROR
, _CRTDBG_MODE_FILE
| _CRTDBG_MODE_DEBUG
);
31 _CrtSetReportFile(_CRT_ERROR
, _CRTDBG_FILE_STDERR
);
32 _CrtSetReportMode(_CRT_ASSERT
, _CRTDBG_MODE_FILE
| _CRTDBG_MODE_DEBUG
);
33 _CrtSetReportFile(_CRT_ASSERT
, _CRTDBG_FILE_STDERR
);
36 testing::InitGoogleTest(&argc
, argv
);
37 testing::FLAGS_gtest_death_test_style
= "threadsafe";
38 return RUN_ALL_TESTS();
40 // Catch all exceptions to make Coverity happy.