Skip to content

Commit dab6486

Browse files
committed
Merge pull request #77 from paxos1977/Issue76
Disable tests in TestTestMacros.cpp which throw exceptions from destructors
2 parents 8741891 + c4e3617 commit dab6486

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/TestTestMacros.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,11 @@ TEST(FixturesWithThrowingCtorsAreFailures)
136136
CHECK(strstr(reporter.lastFailedMessage, "while constructing fixture"));
137137
}
138138

139+
// Visual Studio 2015 in compliance with C++11 standard
140+
// implicitly adds a 'noexcept' to all user defined
141+
// destructors. Any exceptions thrown from destructors
142+
// cause abort() to be called on the process.
143+
#if(_MSC_VER < 1900)
139144
struct FixtureDtorThrows
140145
{
141146
~FixtureDtorThrows() { throw "exception"; }
@@ -161,6 +166,7 @@ TEST(FixturesWithThrowingDtorsAreFailures)
161166
CHECK_EQUAL(1, failureCount);
162167
CHECK(strstr(reporter.lastFailedMessage, "while destroying fixture"));
163168
}
169+
#endif
164170

165171
const int FailingLine = 123;
166172

0 commit comments

Comments
 (0)