Home Libraries People FAQ More

Next

Boost.Mock

A C++ mock object library for Boost

Distributed under the Boost Software License, Version 1.0.


Table of Contents

Motivation
Getting Started
Create, expect, trigger, verify
Expectation selection algorithm
Error diagnostic
Customization
Logging
Constraints
Number of arguments
Test framework integration
Reference
Creation
Expectation
Verification
Reset
Constraint
Patterns
Waiting for an asynchronous call
Retrieving an argument to use in a later constraint
Invoking a functor received as parameter
Quickly writing a custom constraint for a serializable type
Limitations
No support for unicode logging
Literal 0 cannot be used as null pointer in constraints
Template methods cannot be mocked
Private virtual methods cannot be mocked without spelling out the signature
Methods with a throw specifier cannot be mocked
Compilers without support for variadic macros fail on commas in BOOST_MOCK_BASE_CLASS
Warning C4505: '...' : unreferenced local function has been removed
Warning C4301: '...': overriding virtual function only differs from '...' by const/volatile qualifier
Warning C4267: 'argument' : conversion from 'size_t' to 'unsigned int', possible loss of data
Using C++11 lambda as constraints requires decltype compiler support
Rationale
General design forces
Exceptions thrown should not extend std::exception
The library interface is based on many macros
Acknowledgements
[Note] Note

Boost.Mock is not an official Boost library.

Last revised: August 14, 2013 at 17:36:10 GMT


Next