Loading…
Friday September 18, 2026 10:30 - 11:30 MDT
In many languages, you can mock almost anything. Python has unittest.mock, Java has Mockito and PowerMock, and C# has Moq. In C++, you can usually mock only what was designed to be mockable — and little else. Want to mock a free function? Wrap it in an interface. A static method? Refactor to a template. A non-virtual member? Redesign the class hierarchy. The cost is real: developers either shape production code around testing-tool constraints instead of domain needs, or they simply leave hard-to-mock code untested.

This talk introduces BonoboMock, a new C++ mocking library we developed and published as open source that can mock almost any C++ callable — free functions, static methods, non-virtual members, private members, templates, lambdas, and even extern "C" routines — without modifying the code under test. Developed and battle-tested at Bloomberg for three years across a very large C++/C codebase, it aims to deliver a first-class testing experience for C++. Under the hood it uses runtime binary patching — replacing function prologues with redirections at test time, restoring them on scope exit — all surfaced through familiar Google Mock syntax.

We'll show BonoboMock in action, walk through the patching mechanism, and share how to get started -- you'll walk away ready to test almost any function, regardless of how it was designed. Strong test coverage has always been essential, and AI-assisted code generation only increases the need for reliable testing backpressure. C++ deserves mocking tooling that matches.

Tooling Track sessions are sponsored by Optiver.
Presenters
avatar for Ilya Ermakov

Ilya Ermakov

Software Engineer, Bloomberg L.P.
Ilya Ermakov is a Software Engineer at Bloomberg working on Distributed Systems and C++ tooling. Ilya holds a Computer Science degree from Vanderbilt University.
BR

Brian Rudo-Hutt

Brian Rudo-Hutt is a Senior Software Engineer at Bloomberg and organizes engineering-wide initiatives to improve testing, safety, and software maturity. Brian holds Computer Science and Electrical and Computer Engineering degrees from Cornell University and lives with his family in... Read More →
avatar for Ruifeng Zhang

Ruifeng Zhang

Software Engineering Team Lead, Bloomberg LP
Ruifeng Zhang is a software engineering team lead at Bloomberg, where he works on data entitlement systems. Prior to joining Bloomberg, he worked primarily on hardware related projects for CPU development. His interests include testing, performance, API design, and reliability. He... Read More →
Friday September 18, 2026 10:30 - 11:30 MDT
Colorado B

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Share Modal

Share this link via

Or copy link