Archives for: "May 2015, 01"

Unit Testing a Singleton in C++

adaptability, CodeProject, C++, unittest Send feedback »

I have written about the Singleton[^] before. As a quick review from what I previously stated, I don't think the Singleton is misunderstood, I think it is the only software design pattern that most people do understand. Those that call the Singleton an anti-pattern believe that it is overused. It's simple enough in concept compared to the other patterns, that itself may explain why it is used so often. Another criticism that I hear is that it is difficult to unit-test, or at least unit-test properly with a fresh fixture for each test. No, it's not, and I will demonstrate how.

Full story »

Contact / Help. ©2017 by Paul Watt; Charon adapted from work by daroz. multiple blogs / webhosting.
Design & icons by N.Design Studio. Skin by Tender Feelings / Evofactory.