diff options
author | Abseil Team <absl-team@google.com> | 2022-03-21 18:56:42 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-03-21 18:57:05 (GMT) |
commit | 1754febbaa863ae95f34c4aff46162f11186a899 (patch) | |
tree | 91f85057ed67a452adf4fd99b0b6a757745f6b21 /docs | |
parent | b007c54f2944e193ac44fba1bc997cb65826a0b9 (diff) | |
download | googletest-1754febbaa863ae95f34c4aff46162f11186a899.zip googletest-1754febbaa863ae95f34c4aff46162f11186a899.tar.gz googletest-1754febbaa863ae95f34c4aff46162f11186a899.tar.bz2 |
Clarify public access on gmock examples.
PiperOrigin-RevId: 436268062
Change-Id: I3161b36121f78acf920d66fe121b2f1d5e5707b9
Diffstat (limited to 'docs')
-rw-r--r-- | docs/gmock_cheat_sheet.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/gmock_cheat_sheet.md b/docs/gmock_cheat_sheet.md index 3d164ad..67d075d 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 <typename Elem> 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 <typename Elem> class MockStack : public StackInterface<Elem> { - ... + public: MOCK_METHOD(int, GetSize, (), (const, override)); MOCK_METHOD(void, Push, (const Elem& x), (override)); }; |