No hidden charges. No surprise bills. Cancel anytime.
Use your credit across every product. Compute, storage, AI, analytics. When it runs out, 20+ products stay free. You only pay when you choose to.
Start Free
Full-stack observability with actually useful AI | Grafana Cloud
Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.
Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
...Even with Google Mock, we need some hand writing.
I solved this problem by using home made class declaration parser/generator that reads the class declaration (header file), then generates a mock class.
What you need is to run the generator and full featured mock class is there for your unit test.
----
How to use:
You need Ruby. Obtain it if you don't have it yet.
Get Tools
At your convenient directory:
git clone https://git.code.sf.net/p/cpp-tools-in-ruby/code tools
Get Mocker++11
git clone https://git.code.sf.net/p/mockerplusplus11/code mocker++
Run it
Change directory to mocker++
....