Fixed gtest_break_on_failure_unittest on Ubuntu 8.04 and Windows

This commit is contained in:
vladlosev
2008-11-26 20:02:45 +00:00
parent c440a6923a
commit 95536ab53b
5 changed files with 99 additions and 43 deletions

View File

@@ -41,6 +41,9 @@
#include <gtest/gtest.h>
#ifdef GTEST_OS_WINDOWS
#include <windows.h>
#endif
namespace {
@@ -53,6 +56,11 @@ TEST(Foo, Bar) {
int main(int argc, char **argv) {
#ifdef GTEST_OS_WINDOWS
// Suppresses display of the Windows error dialog upon encountering
// a general protection fault (segment violation).
SetErrorMode(SEM_NOGPFAULTERRORBOX | SEM_FAILCRITICALERRORS);
#endif
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();