summaryrefslogtreecommitdiffstats
path: root/googletest/src/gtest.cc
diff options
context:
space:
mode:
authorRobin Lindén <dev@robinlinden.eu>2018-11-10 14:05:55 (GMT)
committerRobin Lindén <dev@robinlinden.eu>2018-11-10 14:20:26 (GMT)
commit826656b25f62ed0a2fadc7c5dde303616e621c08 (patch)
tree01db8e689dc6d256d0a5d65dad6d714cc39b8273 /googletest/src/gtest.cc
parentde5be0eb28b74ecd6335e3bd61d9dc8914ce0e57 (diff)
downloadgoogletest-826656b25f62ed0a2fadc7c5dde303616e621c08.zip
googletest-826656b25f62ed0a2fadc7c5dde303616e621c08.tar.gz
googletest-826656b25f62ed0a2fadc7c5dde303616e621c08.tar.bz2
Remove workarounds for unsupported MSVC versions
Diffstat (limited to 'googletest/src/gtest.cc')
-rw-r--r--googletest/src/gtest.cc19
1 files changed, 3 insertions, 16 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
index 06f09c3..4345e81 100644
--- a/googletest/src/gtest.cc
+++ b/googletest/src/gtest.cc
@@ -4537,24 +4537,17 @@ void TestEventListeners::SuppressEventForwarding() {
// call this before main() starts, from which point on the return
// value will never change.
UnitTest* UnitTest::GetInstance() {
- // When compiled with MSVC 7.1 in optimized mode, destroying the
- // UnitTest object upon exiting the program messes up the exit code,
- // causing successful tests to appear failed. We have to use a
- // different implementation in this case to bypass the compiler bug.
- // This implementation makes the compiler happy, at the cost of
- // leaking the UnitTest object.
-
// CodeGear C++Builder insists on a public destructor for the
// default implementation. Use this implementation to keep good OO
// design with private destructor.
-#if (_MSC_VER == 1310 && !defined(_DEBUG)) || defined(__BORLANDC__)
+#if defined(__BORLANDC__)
static UnitTest* const instance = new UnitTest;
return instance;
#else
static UnitTest instance;
return &instance;
-#endif // (_MSC_VER == 1310 && !defined(_DEBUG)) || defined(__BORLANDC__)
+#endif // defined(__BORLANDC__)
}
// Gets the number of successful test cases.
@@ -4812,18 +4805,12 @@ int UnitTest::Run() {
_set_error_mode(_OUT_TO_STDERR);
# endif
-# if _MSC_VER >= 1400 && !GTEST_OS_WINDOWS_MOBILE
+# if defined(_MSC_VER) && !GTEST_OS_WINDOWS_MOBILE
// In the debug version, Visual Studio pops up a separate dialog
// offering a choice to debug the aborted program. We need to suppress
// this dialog or it will pop up for every EXPECT/ASSERT_DEATH statement
// executed. Google Test will notify the user of any unexpected
// failure via stderr.
- //
- // VC++ doesn't define _set_abort_behavior() prior to the version 8.0.
- // Users of prior VC versions shall suffer the agony and pain of
- // clicking through the countless debug dialogs.
- // FIXME: find a way to suppress the abort dialog() in the
- // debug mode when compiled with VC 7.1 or lower.
if (!GTEST_FLAG(break_on_failure))
_set_abort_behavior(
0x0, // Clear the following flags: