]>
git.proxmox.com Git - ceph.git/blob - ceph/src/fmt/test/test-main.cc
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"
19 # define _CrtSetReportFile(a, b)
20 # define _CrtSetReportMode(a, b)
23 int main(int argc
, char** argv
) {
25 // Don't display any error dialogs. This also suppresses message boxes
26 // on assertion failures in MinGW where _set_error_mode/CrtSetReportMode
28 SetErrorMode(SEM_FAILCRITICALERRORS
| SEM_NOGPFAULTERRORBOX
|
29 SEM_NOOPENFILEERRORBOX
);
31 // Disable message boxes on assertion failures.
32 _CrtSetReportMode(_CRT_ERROR
, _CRTDBG_MODE_FILE
| _CRTDBG_MODE_DEBUG
);
33 _CrtSetReportFile(_CRT_ERROR
, _CRTDBG_FILE_STDERR
);
34 _CrtSetReportMode(_CRT_ASSERT
, _CRTDBG_MODE_FILE
| _CRTDBG_MODE_DEBUG
);
35 _CrtSetReportFile(_CRT_ASSERT
, _CRTDBG_FILE_STDERR
);
37 testing::InitGoogleTest(&argc
, argv
);
38 return RUN_ALL_TESTS();
40 // Catch all exceptions to make Coverity happy.