Commit 876bdfa5 authored by Abseil Team's avatar Abseil Team Committed by Gennadiy Civil
Browse files

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
parent 471f5bc4
...@@ -1854,13 +1854,13 @@ GTEST_API_ GTEST_ATTRIBUTE_PRINTF_(2, 3) void ColoredPrintf(GTestColor color, ...@@ -1854,13 +1854,13 @@ GTEST_API_ GTEST_ATTRIBUTE_PRINTF_(2, 3) void ColoredPrintf(GTestColor color,
// FooTest() { // FooTest() {
// // Can use GetParam() here. // // Can use GetParam() here.
// } // }
// virtual ~FooTest() { // ~FooTest() override {
// // Can use GetParam() here. // // Can use GetParam() here.
// } // }
// virtual void SetUp() { // void SetUp() override {
// // Can use GetParam() here. // // Can use GetParam() here.
// } // }
// virtual void TearDown { // void TearDown override {
// // Can use GetParam() here. // // Can use GetParam() here.
// } // }
// }; // };
...@@ -2380,7 +2380,7 @@ bool StaticAssertTypeEq() { ...@@ -2380,7 +2380,7 @@ bool StaticAssertTypeEq() {
// //
// class FooTest : public testing::Test { // class FooTest : public testing::Test {
// protected: // protected:
// virtual void SetUp() { b_.AddElement(3); } // void SetUp() override { b_.AddElement(3); }
// //
// Foo a_; // Foo a_;
// Foo b_; // Foo b_;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment