“Test Base Class Injection” is a technique that uses C++’s name resolution rules to replace a dependency at compile-time with your own test double/fake/mock.
https://github.com/MiddleRaster/tbci
It works on data-members, arguments, return types, C calls, etc. One use case is mocking a type that is an automatic variable in a static method or constructor, where subclass-and-override doesn’t work.
[link] [comments]




![Halpatiokee Park [Stuart, FL]](https://preview.redd.it/yc2jvtj3cr3h1.jpg?width=140&height=140&crop=1:1,smart&auto=webp&s=b2f1cd5287a887343d041998e03125d29890059e)










English (US) ·