New to Google Cloud? Get $300 in free credit to explore Compute Engine, BigQuery, Cloud Run, Vertex AI, and 150+ other products.
Start your next project with $300 in free Google Cloud credit. Spin up VMs, run containers, query exabytes in BigQuery, or build AI apps with Vertex AI and Gemini. Once your credits are used, keep building with 20+ products with free monthly usage, including Compute Engine, Cloud Storage, GKE, and Cloud Run functions. Sign up to start building right away.
Start Free Trial
MongoDB Atlas runs apps anywhere
Deploy in 115+ regions with the modern database for every enterprise.
MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
...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++
....