18:30 - Doors open, registration
19:00 - Presentation by Gábor Márton
20:00 - Follow-up discussions with snacks
21:00 - Event ends, doors close
Unit testing of object oriented code requires two fundamental artifacts: replacing some of the original code with test doubles (aka dependency injection); and providing extra access to these replaced private dependencies. In most cases we cannot apply link-time or preprocessor based dependency injection, therefore a typical testable unit uses additional interfaces or template type parameters for pure testing purposes.
Thus, a unit which we developed without testing in mind might have to be changed intrusively for testing. These changes can take us far away from the original natural design of the unit. As a result, in C++, test code is often badly interwoven with the unit we want to test.
In this talk I'd like to demonstrate these problems using code examples to show the decay of original design intentions. Then, I will overview the current (partial) solutions for adding extra access for private data, like using friends and the Attorney-Client idiom. Also, I'd like to present how a minimal language extension could help and make the testing code more independent.
About the Presenter
Gábor Márton is a passionate software developer, and he loves modern C++. He is doing his PhD studies at Eötvös Loránd University (ELTE) and the topic is of course around C++. His interests include compiler internals, metaprogramming, and compile-time reflection. He loves nature, especially the mountains, so he does mountaineering, mountain biking and skiing in his spare time.