Mockitopp
FreeA C++ mocking framework inspired by the ideas developed for Mockito written by Szczepan Faber, et al. The purpose is to provide similar construction semantics for creating mock objects leading to smaller, more readable test cases. It is designed to be a lightweight framework allowing you to mock dep
About Mockitopp
A C++ mocking framework inspired by the ideas developed for Mockito by Szczepan Faber et al. It provides similar construction semantics for creating mock objects, leading to smaller, more readable test cases. The framework uses ABI and template techniques to dynamically construct mock delegate classes that intercept calls intended for any pure virtual abstract base class (interface). It offers a simple descriptive domain-specific language for stubbing behavior, verification, and argument matching. Designed to be lightweight, it helps create simpler, less brittle test cases with less maintenance overhead. Limitations: only supports pure virtual abstract base classes; cannot stub non-virtual functions; may produce unexpected results with hybrid classes.
Key Features
Pros & Cons
- Lightweight and easy to integrate
- Inspired by Mockito provides familiar semantics
- Simple descriptive DSL reduces boilerplate
- MIT license allows free use in commercial projects
- Low maintenance overhead
- Only supports pure virtual abstract base classes (interfaces)
- Cannot stub non-virtual functions
- May produce unexpected results when mocking hybrid classes with state or internal dependencies
- Limited documentation beyond basic examples in wiki