Unit testing with Cpp Unit in Windows

Unit testing is pretty cool. It works well with a Linux toolchain, but it can be a hassle to set up in Windows.

Since I was really impressed by the lovely integraition of Subversion into Eclipse, I decided to try cppunit.

First of all, you need a decent GNU toolchain. For Windows, you typically use MinGW – just download and install and make sure to select MSYS. It gives you UNIX shell functionality. (Well, some of it).
Some folks prefer to use CygWin.

Then, download CppUnit. Latest release, but nothing unstable. It’s a tar.bz2-file, which lead me to a curious Wikipedia-search on tar+compression, and the Burrows-Wheeler transform. 🙂 tar, for the Windows folks, is a file format and the name of the program that handles it. You collect a number of files. bz2 means that it was compressed with a certain algorithm (he Burrows-Wheeler transform, see link above), and together, they form something like a zip.

Anyways,  on with cppunit.

It put the file into a folder called

Then I started MinGW (simply press windows and type mingw) and untarred it with
cd software
tar -xjvf -cppunitblah.tar.bz2

make install



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: