diff options
author | Enji Cooper <ngie@FreeBSD.org> | 2020-04-09 01:55:35 +0000 |
---|---|---|
committer | Enji Cooper <ngie@FreeBSD.org> | 2020-04-09 01:55:35 +0000 |
commit | cd024ff37bc5950173e4c7f34f7259d85825e810 (patch) | |
tree | 24e26b52391d78c7c7b65168aca8f803fde926b1 /googletest/samples/sample10_unittest.cc | |
parent | 83481c8c5c0cd0b3fc86f39b2985efd4e300200a (diff) |
Notes
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 |