bonobomock: A GoogleTest-compatible C++ mocking library

Lobsters Hottest Tools

Summary

BonoboMock is a GoogleTest-compatible C++ mocking library that allows mocking of various function types without requiring virtual interfaces, released as open-source by Bloomberg.

<p><a href="https://lobste.rs/s/marwqj/bonobomock_googletest_compatible_c">Comments</a></p>
Original Article
View Cached Full Text

Cached at: 09/17/26, 11:43 PM

bloomberg/bonobomock

Source: https://github.com/bloomberg/bonobomock

BonoboMock mascot


BonoboMock is a GoogleTest-compatible mock library for C++. Unlike traditional mocking frameworks that require virtual interfaces, BonoboMock can mock virtually any type of C++ function, including:

  • Free (global) functions (including extern "C" functions)
  • Static member functions
  • Non-virtual member functions
  • Virtual member functions
  • Protected member functions
  • Private member functions
  • Overloaded and template functions
  • Variadic functions (in C++11 or newer)
  • Lambda functions (in C++11 or newer)

Documentation

Review the project documentation for quickstart guides, cookbook recipes, and API references.

Contributions

We welcome your contributions to help us improve and extend this project!

We welcome issue reports here; be sure to choose the proper template for your issue, so that we can be sure you’re providing us with the necessary information to troubleshoot properly.

Before sending a Pull Request, please make sure you have read our Contribution Guidelines.

License

BonoboMock is Apache 2.0 licensed, as found in the LICENSE file.

Code of Conduct

This project has adopted a Code of Conduct. If you have any concerns about the Code, or behavior which you have experienced in the project, please contact us at [email protected].

Governance

Project decisions are made according to the process defined in our Governance Policy. All changes require maintainer review and open community discussion.

Maintainers

See the current list of Project Maintainers for information on roles, responsibilities, and contact points.

Security Vulnerability Reporting

If you believe you have identified a security vulnerability in this project, please send an email to the project team at [email protected], detailing the suspected issue and any methods you’ve found to reproduce it.

Please do NOT open an issue in the GitHub repository, as we’d prefer to keep vulnerability reports private until we’ve had an opportunity to review and address them.

Similar Articles

A universal approach to mocking with continuations

Lobsters Hottest

A blog post presenting a universal approach to mocking in testing by using continuations to capture effects, allowing tests to verify correct arguments and order of calls without performing the effects. The technique is demonstrated in the Gleam programming language.

catchorg/Catch2

GitHub Trending (daily)

Catch2 is a C++ unit testing framework that also provides micro-benchmarking and BDD macros, known for its natural syntax.

google/googletest

GitHub Trending (daily)

GoogleTest, Google's C++ test framework, has released version 1.18.0 which requires at least C++17, along with documentation updates and ongoing improvements.

Introducing Test That

Lobsters Hottest

Test That is a new Rust library for test assertions, forked from GoogleTest Rust, offering a cleaner API, optional dependencies, and improved matcher composability.

GitHub - pwilkin/openmoss: OpenMOSS pure C++ pipeline based on GGML

Reddit r/LocalLLaMA

OpenMOSS is a standalone C++/GGML port of MOSS-TTS that provides a self-contained binary for text-to-speech and voice cloning, leveraging a Qwen3-8B backbone and 32 RVQ audio codebooks. It includes a CLI for one-shot synthesis and an HTTP server for repeated generations.