diff options
Diffstat (limited to 'googletest/test/googletest-catch-exceptions-test_.cc')
-rw-r--r-- | googletest/test/googletest-catch-exceptions-test_.cc | 61 |
1 files changed, 31 insertions, 30 deletions
diff --git a/googletest/test/googletest-catch-exceptions-test_.cc b/googletest/test/googletest-catch-exceptions-test_.cc index 8270f64..8c127d4 100644 --- a/googletest/test/googletest-catch-exceptions-test_.cc +++ b/googletest/test/googletest-catch-exceptions-test_.cc @@ -64,19 +64,20 @@ class SehExceptionInDestructorTest : public Test { TEST_F(SehExceptionInDestructorTest, ThrowsExceptionInDestructor) {} -class SehExceptionInSetUpTestCaseTest : public Test { +class SehExceptionInSetUpTestSuiteTest : public Test { public: - static void SetUpTestCase() { RaiseException(42, 0, 0, NULL); } + static void SetUpTestSuite() { RaiseException(42, 0, 0, NULL); } }; -TEST_F(SehExceptionInSetUpTestCaseTest, ThrowsExceptionInSetUpTestCase) {} +TEST_F(SehExceptionInSetUpTestSuiteTest, ThrowsExceptionInSetUpTestSuite) {} -class SehExceptionInTearDownTestCaseTest : public Test { +class SehExceptionInTearDownTestSuiteTest : public Test { public: - static void TearDownTestCase() { RaiseException(42, 0, 0, NULL); } + static void TearDownTestSuite() { RaiseException(42, 0, 0, NULL); } }; -TEST_F(SehExceptionInTearDownTestCaseTest, ThrowsExceptionInTearDownTestCase) {} +TEST_F(SehExceptionInTearDownTestSuiteTest, + ThrowsExceptionInTearDownTestSuite) {} class SehExceptionInSetUpTest : public Test { protected: @@ -109,9 +110,9 @@ class CxxExceptionInConstructorTest : public Test { throw std::runtime_error("Standard C++ exception")); } - static void TearDownTestCase() { + static void TearDownTestSuite() { printf("%s", - "CxxExceptionInConstructorTest::TearDownTestCase() " + "CxxExceptionInConstructorTest::TearDownTestSuite() " "called as expected.\n"); } @@ -137,65 +138,65 @@ TEST_F(CxxExceptionInConstructorTest, ThrowsExceptionInConstructor) { << "called unexpectedly."; } - -class CxxExceptionInSetUpTestCaseTest : public Test { +class CxxExceptionInSetUpTestSuiteTest : public Test { public: - CxxExceptionInSetUpTestCaseTest() { + CxxExceptionInSetUpTestSuiteTest() { printf("%s", - "CxxExceptionInSetUpTestCaseTest constructor " + "CxxExceptionInSetUpTestSuiteTest constructor " "called as expected.\n"); } - static void SetUpTestCase() { + static void SetUpTestSuite() { throw std::runtime_error("Standard C++ exception"); } - static void TearDownTestCase() { + static void TearDownTestSuite() { printf("%s", - "CxxExceptionInSetUpTestCaseTest::TearDownTestCase() " + "CxxExceptionInSetUpTestSuiteTest::TearDownTestSuite() " "called as expected.\n"); } protected: - ~CxxExceptionInSetUpTestCaseTest() override { + ~CxxExceptionInSetUpTestSuiteTest() override { printf("%s", - "CxxExceptionInSetUpTestCaseTest destructor " + "CxxExceptionInSetUpTestSuiteTest destructor " "called as expected.\n"); } void SetUp() override { printf("%s", - "CxxExceptionInSetUpTestCaseTest::SetUp() " + "CxxExceptionInSetUpTestSuiteTest::SetUp() " "called as expected.\n"); } void TearDown() override { printf("%s", - "CxxExceptionInSetUpTestCaseTest::TearDown() " + "CxxExceptionInSetUpTestSuiteTest::TearDown() " "called as expected.\n"); } }; -TEST_F(CxxExceptionInSetUpTestCaseTest, ThrowsExceptionInSetUpTestCase) { +TEST_F(CxxExceptionInSetUpTestSuiteTest, ThrowsExceptionInSetUpTestSuite) { printf("%s", - "CxxExceptionInSetUpTestCaseTest test body " + "CxxExceptionInSetUpTestSuiteTest test body " "called as expected.\n"); } -class CxxExceptionInTearDownTestCaseTest : public Test { +class CxxExceptionInTearDownTestSuiteTest : public Test { public: - static void TearDownTestCase() { + static void TearDownTestSuite() { throw std::runtime_error("Standard C++ exception"); } }; -TEST_F(CxxExceptionInTearDownTestCaseTest, ThrowsExceptionInTearDownTestCase) {} +TEST_F(CxxExceptionInTearDownTestSuiteTest, + ThrowsExceptionInTearDownTestSuite) {} class CxxExceptionInSetUpTest : public Test { public: - static void TearDownTestCase() { + static void TearDownTestSuite() { printf("%s", - "CxxExceptionInSetUpTest::TearDownTestCase() " + "CxxExceptionInSetUpTest::TearDownTestSuite() " "called as expected.\n"); } @@ -222,9 +223,9 @@ TEST_F(CxxExceptionInSetUpTest, ThrowsExceptionInSetUp) { class CxxExceptionInTearDownTest : public Test { public: - static void TearDownTestCase() { + static void TearDownTestSuite() { printf("%s", - "CxxExceptionInTearDownTest::TearDownTestCase() " + "CxxExceptionInTearDownTest::TearDownTestSuite() " "called as expected.\n"); } @@ -244,9 +245,9 @@ TEST_F(CxxExceptionInTearDownTest, ThrowsExceptionInTearDown) {} class CxxExceptionInTestBodyTest : public Test { public: - static void TearDownTestCase() { + static void TearDownTestSuite() { printf("%s", - "CxxExceptionInTestBodyTest::TearDownTestCase() " + "CxxExceptionInTestBodyTest::TearDownTestSuite() " "called as expected.\n"); } |