From 1754febbaa863ae95f34c4aff46162f11186a899 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Mon, 21 Mar 2022 11:56:42 -0700 Subject: [PATCH] Clarify public access on gmock examples. PiperOrigin-RevId: 436268062 Change-Id: I3161b36121f78acf920d66fe121b2f1d5e5707b9 --- docs/gmock_cheat_sheet.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/gmock_cheat_sheet.md b/docs/gmock_cheat_sheet.md index 3d164ad6..67d075dd 100644 --- a/docs/gmock_cheat_sheet.md +++ b/docs/gmock_cheat_sheet.md @@ -8,7 +8,7 @@ Given ```cpp class Foo { - ... + public: virtual ~Foo(); virtual int GetSize() const = 0; virtual string Describe(const char* name) = 0; @@ -23,7 +23,7 @@ class Foo { #include "gmock/gmock.h" class MockFoo : public Foo { - ... + public: MOCK_METHOD(int, GetSize, (), (const, override)); MOCK_METHOD(string, Describe, (const char* name), (override)); MOCK_METHOD(string, Describe, (int type), (override)); @@ -58,7 +58,7 @@ To mock ```cpp template class StackInterface { - ... + public: virtual ~StackInterface(); virtual int GetSize() const = 0; virtual void Push(const Elem& x) = 0; @@ -71,7 +71,7 @@ class StackInterface { ```cpp template class MockStack : public StackInterface { - ... + public: MOCK_METHOD(int, GetSize, (), (const, override)); MOCK_METHOD(void, Push, (const Elem& x), (override)); };