TDD Books for C++

c++, tdd

Solution

To be honest, I'd just go with a standard book on TDD - the basic principles are the important part, and the specific technologies used to express them are mere details.

I've had a lot of success with transplanting the basic principles in Growing Object Oriented Software Guided by Tests - which targets Java + JUnit + JMock + WindowLicker, and contains a running example which, while slighty toy-ish, still encompasses all the topics mentioned in your post - into C++ + Google Test + Google Mock + QTestLib. The main stumbling block stems from the fact that the Java tools are in many ways more sophisticated than their C++ counterparts, but you can usually find some way to emulate the important parts in C++.

Problem

What material would you recommend for stubborn C++ developers who need to learn to develop using TDD. I would like a book which contains examples which are more than just testing simple functions but which deal with the testing of classes making use of dependency injection.

Original source