Update docs for v1.16.x branch
[google-test.git] / googlemock / README.md
blobe1103b16bbfcddff9a9a28b8ae2705b950184646
1 # Googletest Mocking (gMock) Framework
3 ### Overview
5 Google's framework for writing and using C++ mock classes. It can help you
6 derive better designs of your system and write better tests.
8 It is inspired by:
10 *   [jMock](http://www.jmock.org/)
11 *   [EasyMock](https://easymock.org/)
12 *   [Hamcrest](https://code.google.com/p/hamcrest/)
14 It is designed with C++'s specifics in mind.
16 gMock:
18 -   Provides a declarative syntax for defining mocks.
19 -   Can define partial (hybrid) mocks, which are a cross of real and mock
20     objects.
21 -   Handles functions of arbitrary types and overloaded functions.
22 -   Comes with a rich set of matchers for validating function arguments.
23 -   Uses an intuitive syntax for controlling the behavior of a mock.
24 -   Does automatic verification of expectations (no record-and-replay needed).
25 -   Allows arbitrary (partial) ordering constraints on function calls to be
26     expressed.
27 -   Lets a user extend it by defining new matchers and actions.
28 -   Does not use exceptions.
29 -   Is easy to learn and use.
31 Details and examples can be found here:
33 *   [gMock for Dummies](https://google.github.io/googletest/gmock_for_dummies.html)
34 *   [Legacy gMock FAQ](https://google.github.io/googletest/gmock_faq.html)
35 *   [gMock Cookbook](https://google.github.io/googletest/gmock_cook_book.html)
36 *   [gMock Cheat Sheet](https://google.github.io/googletest/gmock_cheat_sheet.html)
38 GoogleMock is a part of
39 [GoogleTest C++ testing framework](https://github.com/google/googletest/) and a
40 subject to the same requirements.