summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest/gtest-typed-test.h
diff options
context:
space:
mode:
authorRobert Luberda <robert@debian.org>2019-10-09 19:48:00 (GMT)
committerRobert Luberda <robert@debian.org>2019-10-11 21:45:31 (GMT)
commit3cddd56e195b516f449bea6dcd3edd4494195631 (patch)
tree43d4759ae7f635c361ebc9262d26b7cdfd6cc529 /googletest/include/gtest/gtest-typed-test.h
parentba513d2c9525a7c986c115ed5d603f2cf17c6016 (diff)
downloadgoogletest-3cddd56e195b516f449bea6dcd3edd4494195631.zip
googletest-3cddd56e195b516f449bea6dcd3edd4494195631.tar.gz
googletest-3cddd56e195b516f449bea6dcd3edd4494195631.tar.bz2
Add more override keywordsrefs/pull/2507/head
Mark more functions with "override" keyword, just like it was done in commit 2460f97152c. This should prevent compiler from complaining while compiling both user code, and the googletest code itself with the -Wsuggest-override option turned on; with the exception of: * calls to new MOCK_METHOD() in test/gmock-function-mocker_test.cc * calls to old MOCK_METHODx()/MOCK_CONST_METHODx() in other unit test files. Closes #2493
Diffstat (limited to 'googletest/include/gtest/gtest-typed-test.h')
-rw-r--r--googletest/include/gtest/gtest-typed-test.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/googletest/include/gtest/gtest-typed-test.h b/googletest/include/gtest/gtest-typed-test.h
index 095ce05..6b7c9c8 100644
--- a/googletest/include/gtest/gtest-typed-test.h
+++ b/googletest/include/gtest/gtest-typed-test.h
@@ -201,7 +201,7 @@ INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes);
private: \
typedef CaseName<gtest_TypeParam_> TestFixture; \
typedef gtest_TypeParam_ TypeParam; \
- virtual void TestBody(); \
+ void TestBody() override; \
}; \
static bool gtest_##CaseName##_##TestName##_registered_ \
GTEST_ATTRIBUTE_UNUSED_ = \
@@ -276,7 +276,7 @@ INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes);
private: \
typedef SuiteName<gtest_TypeParam_> TestFixture; \
typedef gtest_TypeParam_ TypeParam; \
- virtual void TestBody(); \
+ void TestBody() override; \
}; \
static bool gtest_##TestName##_defined_ GTEST_ATTRIBUTE_UNUSED_ = \
GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName).AddTestName( \