diff options
Diffstat (limited to 'googletest/samples/sample10_unittest.cc')
-rw-r--r-- | googletest/samples/sample10_unittest.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/googletest/samples/sample10_unittest.cc b/googletest/samples/sample10_unittest.cc index 7ce9550f883a..36cdac2279ae 100644 --- a/googletest/samples/sample10_unittest.cc +++ b/googletest/samples/sample10_unittest.cc @@ -74,12 +74,12 @@ int Water::allocated_ = 0; class LeakChecker : public EmptyTestEventListener { private: // Called before a test starts. - virtual void OnTestStart(const TestInfo& /* test_info */) { + void OnTestStart(const TestInfo& /* test_info */) override { initially_allocated_ = Water::allocated(); } // Called after a test ends. - virtual void OnTestEnd(const TestInfo& /* test_info */) { + void OnTestEnd(const TestInfo& /* test_info */) override { int difference = Water::allocated() - initially_allocated_; // You can generate a failure in any event handler except @@ -100,7 +100,7 @@ TEST(ListenersTest, DoesNotLeak) { // specified. TEST(ListenersTest, LeaksWater) { Water* water = new Water; - EXPECT_TRUE(water != NULL); + EXPECT_TRUE(water != nullptr); } } // namespace |