Two good news: file I/O is unit-testable, and it is surprisingly easy to do. Let’s see how it works! A software no-one asked for First, we need a piece of software that deals with files and that has to be unit-tested. The TestableIO project does the following: given a directory,…
-
-
Some might say that testing private methods should be avoided because it means not testing the contract, that is the interface implemented by the class, but the internal implementation of the class itself. Still, not all classes were designed with testability in mind, so real life compromises sometimes demand such…
-
It is not easy to monitor how our code behaves on a vast array of different machines. A myriad of different configurations can lead to errors that are difficult to reproduce and even more difficult to anticipate. And when the customer calls complaining about a crash, provided information on what…
-
In Visual Studio 2012, after installing Installshield LE 2012, you can include setup projects into your solution, as shown below: Adding the Setup project to the solution, and including it into the Release configuration, makes for a quick, 1-click compilation procedure of both the main app and the installer. Still,…
-
In a previous post, Unit testing with Visual C++ 2012, the unit testing features of Visual Studio 2012 were shown to be an effective way to improve software quality by introducing various tests. Still, instead of having to run these tests inside the Visual Studio IDE, it would be even…
-
The article related to multi-threading and SSE2 optimizations (you can find it here) uses a quick-and-dirty way to check if the optimized code is correct, i.e. it runs an iteration on a given input image with a reference serial code, stores the resulting output image, runs an iteration of the…