Do you unit test your C++ templates? It may be tricky as sometimes it's not clear how to inject mock code into a template. Traits can help!
Unit Testing C++ Templates and Mock Injection Using Traits
by Sumant Tambe
About the Article:
Unit testing your template code comes up from time to time. (You test your templates, right?) Some templates are easy to test. No others. Sometimes it's not clear how to about injecting mock code into the template code that's under test. I've seen several reasons why code injection becomes challenging.
Add a Comment