Download News Support Project

Next

Turtle

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
Thread safety
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
Non-virtual 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 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
Changelog
1.2.6
1.2.5
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0
1.1.1
1.1.0
1.0.1
Acknowledgements
[Note] Note

Turtle is not an official Boost library.

Last revised: May 29, 2014 at 09:58:56 GMT


Next