1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- #include "gtest/gtest.h"
- #include <stdio.h> // for fflush, fprintf, NULL, etc.
- #include <stdlib.h> // for exit
- #include <exception> // for set_terminate
- void TerminateHandler() {
- fprintf(stderr, "%s\n", "Unhandled C++ exception terminating the program.");
- fflush(nullptr);
- exit(1);
- }
- int main(int argc, char** argv) {
- #if GTEST_HAS_EXCEPTIONS
- std::set_terminate(&TerminateHandler);
- #endif
- testing::InitGoogleTest(&argc, argv);
-
-
-
-
-
-
-
- EXPECT_EQ(2, 3);
-
-
- return 0;
- }
|