| 6957 | } |
| 6958 | |
| 6959 | static SetUpTearDownSuiteFuncType GetTearDownCaseOrSuite(const char* filename, |
| 6960 | int line_num) { |
| 6961 | SetUpTearDownSuiteFuncType test_case_fp = |
| 6962 | GetNotDefaultOrNull(&T::TearDownTestCase, &Test::TearDownTestCase); |
| 6963 | SetUpTearDownSuiteFuncType test_suite_fp = |
| 6964 | GetNotDefaultOrNull(&T::TearDownTestSuite, &Test::TearDownTestSuite); |
| 6965 | |
| 6966 | GTEST_CHECK_(!test_case_fp || !test_suite_fp) |
| 6967 | << "Test can not provide both TearDownTestSuite and TearDownTestCase," |
| 6968 | " please make sure there is only one present at" |
| 6969 | << filename << ":" << line_num; |
| 6970 | |
| 6971 | return test_case_fp != nullptr ? test_case_fp : test_suite_fp; |
| 6972 | } |
| 6973 | }; |
| 6974 | |
| 6975 | // Creates a new TestInfo object and registers it with Google Test; |
nothing calls this directly
no test coverage detected