r/cpp • • Apr 13 '26

The Global API Injection Pattern

https://www.elbeno.com/blog/?p=1831
63 Upvotes

17 comments sorted by

View all comments

Show parent comment

1

u/sheckey Apr 21 '26

Ah yes, I see. I agree 100% and that is my plan as well - make everything unit testable at the lowest levels. I do want to have some integration tests for time-based and other event-based stateful code which is less common. I suppose that is just another form of unit test. It’s interesting that your whole system is so complicated as to make full system integration test not practical. I would be tempted to at least make some integration tests for cases that maybe exercise one of those features at a time to make sure all the plumbing works and we didn’t make some simple mistake. Hey thanks for replying!