proxygen
gtest_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

int main ( int  argc,
char **  argv 
)

Definition at line 66 of file gtest_break_on_failure_unittest_.cc.

References testing::InitGoogleTest(), and RUN_ALL_TESTS().

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