Fixes threading annotations and compatibility with C++11, which doesn't

allow exepctions to be thrown in a destructor.
This commit is contained in:
zhanyong.wan
2012-05-31 20:37:13 +00:00
parent cdb24f86d5
commit a3b859162d
3 changed files with 16 additions and 10 deletions

View File

@@ -137,6 +137,8 @@ TEST_F(CxxExceptionInConstructorTest, ThrowsExceptionInConstructor) {
<< "called unexpectedly.";
}
// Exceptions in destructors are not supported in C++11.
#if !defined(__GXX_EXPERIMENTAL_CXX0X__) && __cplusplus < 201103L
class CxxExceptionInDestructorTest : public Test {
public:
static void TearDownTestCase() {
@@ -153,6 +155,7 @@ class CxxExceptionInDestructorTest : public Test {
};
TEST_F(CxxExceptionInDestructorTest, ThrowsExceptionInDestructor) {}
#endif // C++11 mode
class CxxExceptionInSetUpTestCaseTest : public Test {
public: