The Search For A Simple C++ Unit Tester : UnitTest++

For a full list of my adventures in search of a c++ unit tester, return to the main page here. This section will focus on one candidate: UnitTest++.

UnitTest++

Documentation: UnitTest++

Installation

Downloaded unittest-cpp-1.4. Unzipped, entered folder, typed ‘make’, and it just worked. Like magic. Easiest installation of all the unit testers I have found so far =)

Run An Example

The basic download includes many sample tests. Perhaps too many… the scope is somewhat overwhelming. Using the documentation page as a guide, I wrote a few basic tests of my own instead.

The tests were easy to write, and compiled without a problem (when I remembered to link to libUnitTest++.a). I was able to use helper functions, which is always a plus =)

Assessment

Pros
  • Great documentation!
  • Helper functions allowed within a test (although you would have to use messages to create a useful backtrace)
  • Untested, but useful-looking functions for time constraints and array checking
  • Continues functions even after catching an error
  • Doesn’t take forever to compile! (unlike some others I’ve encountered)
Cons
  • Requires linking to a library
  • Output is not grouped well visually, but does convey the necessary information.

Rating: 9

Advertisements
This entry was posted in C++. Bookmark the permalink.

One Response to The Search For A Simple C++ Unit Tester : UnitTest++

  1. Pingback: The Search For A Simple C++ Unit Tester | denvercoder9

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