@@ -1993,7 +1993,7 @@ void Test::Run() {
1993
1993
if (!HasSameFixtureClass ()) return ;
1994
1994
1995
1995
internal::UnitTestImpl* const impl = internal::GetUnitTestImpl ();
1996
- #ifdef GTEST_OS_WINDOWS
1996
+ #if defined( GTEST_OS_WINDOWS) && !defined(__MINGW32__)
1997
1997
// We are on Windows.
1998
1998
impl->os_stack_trace_getter ()->UponLeavingGTest ();
1999
1999
__try {
@@ -2025,7 +2025,7 @@ void Test::Run() {
2025
2025
AddExceptionThrownFailure (GetExceptionCode (), " TearDown()" );
2026
2026
}
2027
2027
2028
- #else // We are on Linux or Mac - exceptions are disabled.
2028
+ #else // We are on Linux, Mac or MingW - exceptions are disabled.
2029
2029
impl->os_stack_trace_getter ()->UponLeavingGTest ();
2030
2030
SetUp ();
2031
2031
@@ -2227,7 +2227,7 @@ void TestInfoImpl::Run() {
2227
2227
const TimeInMillis start = GetTimeInMillis ();
2228
2228
2229
2229
impl->os_stack_trace_getter ()->UponLeavingGTest ();
2230
- #ifdef GTEST_OS_WINDOWS
2230
+ #if defined( GTEST_OS_WINDOWS) && !defined(__MINGW32__)
2231
2231
// We are on Windows.
2232
2232
Test* test = NULL ;
2233
2233
@@ -2240,7 +2240,7 @@ void TestInfoImpl::Run() {
2240
2240
" the test fixture's constructor" );
2241
2241
return ;
2242
2242
}
2243
- #else // We are on Linux or Mac OS - exceptions are disabled.
2243
+ #else // We are on Linux, Mac OS or MingW - exceptions are disabled.
2244
2244
2245
2245
// TODO(wan): If test->Run() throws, test won't be deleted. This is
2246
2246
// not a problem now as we don't use exceptions. If we were to
@@ -3271,7 +3271,7 @@ void UnitTest::RecordPropertyForCurrentTest(const char* key,
3271
3271
// We don't protect this under mutex_, as we only support calling it
3272
3272
// from the main thread.
3273
3273
int UnitTest::Run () {
3274
- #ifdef GTEST_OS_WINDOWS
3274
+ #if defined( GTEST_OS_WINDOWS) && !defined(__MINGW32__)
3275
3275
3276
3276
#if !defined(_WIN32_WCE)
3277
3277
// SetErrorMode doesn't exist on CE.
@@ -3294,7 +3294,7 @@ int UnitTest::Run() {
3294
3294
}
3295
3295
3296
3296
#else
3297
- // We are on Linux or Mac OS. There is no exception of any kind.
3297
+ // We are on Linux, Mac OS or MingW . There is no exception of any kind.
3298
3298
3299
3299
return impl_->RunAllTests ();
3300
3300
#endif // GTEST_OS_WINDOWS
0 commit comments