Repository navigation
v9 - New facade facilities and more!
Additions
- A full new set of facade generator functions were introduced
(MIMICPP_)MAKE_FACADE_EXT(MIMICPP_)MAKE_OVERLOADED_FACADE_EXT(MIMICPP_)MAKE_MEMBER_MOCK(MIMICPP_)MAKE_OVERLOADED_MEMBER_MOCK(MIMICPP_)MAKE_MEMBER_MOCK_WITH_THIS(MIMICPP_)MAKE_OVERLOADED_MEMBER_MOCK_WITH_THIS
- Official
boost::stacktraceintegration (users still need to manually fetch Boost). - Added
settings::stacktrace_base_skip. - Added
mimicpp::util::StaticStringutility. - Added several signatrue related traits
mimicpp::signature_add_lvalue_ref_qualifiermimicpp::signature_add_rvalue_ref_qualifiermimicpp::signature_prepend_param
Changes
matches::instanceallowes type-hierarchies.- Re-designed the inner mechanics of
mimicpp::util::Stacktrace(formerly known asmimicpp::Stacktrace). - Re-worked mimic++'s clang-format file (thanks to @2LoS for that contribution).
- Re-worked the
mimicpp::is_overload_settrait and enhanced efficiency. - Deprecated
(MIMICPP_)MOCK_METHODand(MIMICPP_)MOCK_OVERLOADED_METHOD. - Deprecated
mimicpp::SequenceTin favor ofmimicpp::Sequence.
Fixes
- The official Catch2 Adapter now tries to explicitly flush Catch2's failure messages when a fatal violation occurs.
This ensures that diagnostic output is visible even if aCatch::TestFailureExceptionis thrown within anoexceptfunction.
This issue primarily impacts CLion users, and a related bug report can be found here: CPP-46474. - The package now correctly generates the target
mimicpp::mimicpp.
Removals
- The option for a custom source-location backend was removed.
Migration Guide
Deprecating (MIMICPP_)MOCK_METHOD and (MIMICPP_)MOCK_OVERLOADED_METHOD
There is no immediate requirement to update existing interface mocks; however, these macros are planned for removal in the long term.
Migrating is straightforward: simply replace (MIMICPP_)MOCK_METHOD with (MIMICPP_)MAKE_MEMBER_MOCK, and (MIMICPP_)MOCK_OVERLOADED_METHOD with (MIMICPP_)MAKE_OVERLOADED_MEMBER_MOCK.
Note that the new macros do not automatically add override, so be sure to explicitly specify it when replacing the old ones.
Custom SourceLocation backend
If you are not using a custom backend (or the provided compatibility backend), you can safely stop reading here.
The option to use a custom backend has been completely removed, since it provided little practical benefit. In almost all cases (~99%), std::source_location is used directly. The remaining few cases typically involved gcc 10 or 11 users who only needed mimic++ to work in their environment.
For those users, there’s good news: you can now remove MIMICPP_CONFIG_ALTERNATIVE_SOURCE_LOCATION_BACKEND from your CMake configuration. You can also clean up any related setup for a custom source location. mimic++ will automatically fall back to compiler-specific intrinsics when necessary.
If you encounter issues with a particular compiler or environment that I haven’t accounted for, please reach out on Discord or open an issue.
New Contributors
Full Changelog: v8...v9