summaryrefslogtreecommitdiffstats
path: root/test/gtest_catch_exceptions_test_.cc
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2012-05-31 20:37:13 (GMT)
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2012-05-31 20:37:13 (GMT)
commita3b859162dd7a4a1798cf8753a03098f2cbdb62e (patch)
treeed3a1185c93839b0026103187b5fad7dd349f359 /test/gtest_catch_exceptions_test_.cc
parentcdb24f86d56e5a3ff84b6f1fa71e0b33f22d9152 (diff)
downloadgoogletest-a3b859162dd7a4a1798cf8753a03098f2cbdb62e.zip
googletest-a3b859162dd7a4a1798cf8753a03098f2cbdb62e.tar.gz
googletest-a3b859162dd7a4a1798cf8753a03098f2cbdb62e.tar.bz2
Fixes threading annotations and compatibility with C++11, which doesn't
allow exepctions to be thrown in a destructor.
Diffstat (limited to 'test/gtest_catch_exceptions_test_.cc')
-rw-r--r--test/gtest_catch_exceptions_test_.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/gtest_catch_exceptions_test_.cc b/test/gtest_catch_exceptions_test_.cc
index a35103f..d0fc82c 100644
--- a/test/gtest_catch_exceptions_test_.cc
+++ b/test/gtest_catch_exceptions_test_.cc
@@ -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: