tesseract v5.3.3.20231005
googletest-break-on-failure-unittest_.cc File Reference
#include "gtest/gtest.h"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 65 of file googletest-break-on-failure-unittest_.cc.

65 {
66#if GTEST_OS_WINDOWS
67 // Suppresses display of the Windows error dialog upon encountering
68 // a general protection fault (segment violation).
69 SetErrorMode(SEM_NOGPFAULTERRORBOX | SEM_FAILCRITICALERRORS);
70
71# if GTEST_HAS_SEH && !GTEST_OS_WINDOWS_MOBILE
72
73 // The default unhandled exception filter does not always exit
74 // with the exception code as exit code - for example it exits with
75 // 0 for EXCEPTION_ACCESS_VIOLATION and 1 for EXCEPTION_BREAKPOINT
76 // if the application is compiled in debug mode. Thus we use our own
77 // filter which always exits with the exception code for unhandled
78 // exceptions.
79 SetUnhandledExceptionFilter(ExitWithExceptionCode);
80
81# endif
82#endif // GTEST_OS_WINDOWS
83 testing::InitGoogleTest(&argc, argv);
84
85 return RUN_ALL_TESTS();
86}
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
Definition: gtest.h:2489
GTEST_API_ void InitGoogleTest(int *argc, char **argv)
Definition: gtest.cc:6660