Testing Templates, Testing Tests

Peter Hrenka

⏱ 90 minute session
intermediate
advanced
11:00-12:30, Friday, 19th April 2024
Software Testing has come a long way and has made it into the mainstream. But C++ language provides powerful template mechanisms where not all types are knowable ahead of time, e.g. in the scope of template libraries. This raises questions when tests for templates constructs can be considered complete. This talk will motivate and show a structured approach of how to handle this uncertainty. It will also show some failed attempts along the way. Having a solution pattern is nice but we would also like to know how good our tests are which is also much harder in presence of templates as the usual coverage metric is problematic. This talk will show an additional test quality metric and it will show some technical and organizational ideas to improve that metric.
🏷 testing
🏷 templates
🏷 best practices

Peter Hrenka

I started programming C++ in the last millennium and did a lot of 3d and OpenGL programming and I have moved on to safety critical systems.