• .NET - Programming - Testing

    Unit-testing file I/O

    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,…

  • .NET - Programming - Testing

    Necessary evil: testing private methods

    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…

  • Testing

    Unit testing with Visual C++ 2012

    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…