From 5133504b31daaaf02d31c130b4f19eba4c28c9fe Mon Sep 17 00:00:00 2001 From: Krystian Kuzniarek Date: Thu, 18 Jul 2019 17:06:22 +0200 Subject: [PATCH 1/2] document a missing parent class --- googletest/docs/advanced.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googletest/docs/advanced.md b/googletest/docs/advanced.md index d31e4cfb..b4e4c215 100644 --- a/googletest/docs/advanced.md +++ b/googletest/docs/advanced.md @@ -1222,7 +1222,7 @@ First, you subclass the `::testing::Environment` class to define a test environment, which knows how to set-up and tear-down: ```c++ -class Environment { +class Environment : public ::testing::Environment { public: virtual ~Environment() {} From fb1e478f00c3d97012ab08a646489509ae953e8d Mon Sep 17 00:00:00 2001 From: Krystian Kuzniarek Date: Thu, 18 Jul 2019 17:07:53 +0200 Subject: [PATCH 2/2] explicitly show overriding to align examples to their comments --- googletest/docs/advanced.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/googletest/docs/advanced.md b/googletest/docs/advanced.md index b4e4c215..25697701 100644 --- a/googletest/docs/advanced.md +++ b/googletest/docs/advanced.md @@ -1227,10 +1227,10 @@ class Environment : public ::testing::Environment { virtual ~Environment() {} // Override this to define how to set up the environment. - virtual void SetUp() {} + void SetUp() override {} // Override this to define how to tear down the environment. - virtual void TearDown() {} + void TearDown() override {} }; ```