From 876bdfa565b7260394baecdb4a132a738b9ec508 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Fri, 1 Feb 2019 19:24:17 -0500 Subject: 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 --- googletest/include/gtest/gtest.h | 8 ++++---- 1 file 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_; -- cgit v0.12