1. 杂记
阅读GMock README
2. GoogleMock Features
- provides a declarative syntax for defining mocks,
- can easily define partial (hybrid) mocks, which are a cross of real
and mock objects,
- handles functions of arbitrary types and overloaded functions,
- comes with a rich set of matchers for validating function arguments,
- uses an intuitive syntax for controlling the behavior of a mock,
- does automatic verification of expectations (no record-and-replay
needed),
- allows arbitrary (partial) ordering constraints on
function calls to be expressed,
- lets a user extend it by defining new matchers and actions.
- does not use exceptions, and
- is easy to learn and use.
Q:make check不work -------- 花了大概10分钟才结束,有点奇怪。
3. 《Google Mock for Dummies》
* mock and fake
- Fake objects have working implementations, but usually take some shortcut (perhaps to make the operations less expensive), which makes them not suitable for production. An in-memory file system would be an example of a fake.
- Mocks are objects pre-programmed with expectations, which form a specification of the calls they are expected to receive.