Hey everyone, it’s been a while since my last update — but I’m happy to share that mimic++ v9 is now live!
🔗 GitHub: github.com/DNKpp/mimicpp
⚙️ Try it instantly on Compiler Explorer: godbolt.org/z/4o4Wq5c8q
For those who haven’t seen it before:
mimic++ is a flexible, header-only mocking framework for C++20. It emphasizes compile-time safety and minimal reliance on macros letting you write expressive tests with (mostly) pure C++.
### Facade Macros.
A brand-new set of (optional) facade macros now lets you generate real C++ functions that forward to
mimicpp::Mock objects.That means much less manual boilerplate — you can quickly mock APIs by reusing
mimicpp::Mock as a base building block.### Enhanced Diagnostic
Several concept-based constraints were replaced by carefully crafted
static_asserts with clearer messages, which also provide links to the documentation.These error messages are now unit-tested to ensure they stay readable!
If you’re curious how that works, I wrote a short article about Robust compile-error tests with CMake.
### The Stacktrace-Integraiton
The optional stacktrace feature has been reworked and will likely graduate from “experimental” next release.
You can integrate it with:
-
std::stacktrace-
cpptrace-
boost::stacktrace…or provide your own custom backend with minimal effort.
### Groundwork for C++ Modules
Experimental support for C++20 modules has landed.
It’s not yet fully portable, but the foundation is there — currently working in a few select compiler environments.
### Closing Thoughts
This release focuses on making mimic++ developer-friendly, especially around diagnostics and setup.
If you’ve been waiting for a good moment to try it — this is probably it. 🙂
I’d love feedback, especially from people who’ve tried other mocking frameworks in real projects.
https://redd.it/1oa9s88
@r_cpp