summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2019-02-02 00:24:17 (GMT)
committerGennadiy Civil <misterg@google.com>2019-02-04 19:19:41 (GMT)
commit876bdfa565b7260394baecdb4a132a738b9ec508 (patch)
tree7693f552a85ad9836068deb28e775fc046fb9b08
parent471f5bc433c00fcd0ba778c3f96c91039043cfaa (diff)
downloadgoogletest-876bdfa565b7260394baecdb4a132a738b9ec508.zip
googletest-876bdfa565b7260394baecdb4a132a738b9ec508.tar.gz
googletest-876bdfa565b7260394baecdb4a132a738b9ec508.tar.bz2
Googletest export
Update example code in gtest.h to prefer override over virtual now that it is widely available in C++11. PiperOrigin-RevId: 232057792
-rw-r--r--googletest/include/gtest/gtest.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h
index bcea145..beda83f 100644
--- a/googletest/include/gtest/gtest.h
+++ b/googletest/include/gtest/gtest.h
@@ -1854,13 +1854,13 @@ GTEST_API_ GTEST_ATTRIBUTE_PRINTF_(2, 3) void ColoredPrintf(GTestColor color,
// FooTest() {
// // Can use GetParam() here.
// }
-// virtual ~FooTest() {
+// ~FooTest() override {
// // Can use GetParam() here.
// }
-// virtual void SetUp() {
+// void SetUp() override {
// // Can use GetParam() here.
// }
-// virtual void TearDown {
+// void TearDown override {
// // Can use GetParam() here.
// }
// };
@@ -2380,7 +2380,7 @@ bool StaticAssertTypeEq() {
//
// class FooTest : public testing::Test {
// protected:
-// virtual void SetUp() { b_.AddElement(3); }
+// void SetUp() override { b_.AddElement(3); }
//
// Foo a_;
// Foo b_;