MiniCppUnit

the C++ JUnit port with a minimalistic aproach

Description

MiniCppUnit is another C++ port of the famous JUnit framework for unit testing. Unlike CppUnit, MiniCppUnit follows a minimalistic aproach: The basic features are the same but in only bout 500 lines of code! No library instalation is needed, etc.

This C++ framework takes advantadge of OO C++ techiques and the standard library. The TestFixtures (test classes) definition is done through C macros, ala CppUnit. This project was originally created as a tool for undergrade computer students. Students wrote their own tests using the framework, and it also served as implementation example for a number of GoF Design Patterns (singleton, factory, command, composite).

This sofware is licenced with GPL and kindly hosted in sourceforge

Technical things:

No installation needed. It's just (currently) two source files. It relies on C++ standard features as well as the C++ standard library. It has been tested it with MS VC6, MS VC7.NET and GCC3.X on linux (debian) and cygwin

Authors

Documentation

Doxygen doc available in html

Source code to download

Content:
MiniCppUnit.cxx
MiniCppUnit.hxx
SConstruct
TestsRunner.cxx
UsageExample.cxx

Changelog

version 2.5 2006-03-14
   - MS Visual compatibility: SConstruct ccflags, usage example, #ifdefs
version 2.4 2006-03-14
   - test cases now exit after the first failure
   - double and float comparison with fuzzy equals (using an epsilon that is proportional to the expected value)
   - take into account not-a-numbers
   - new ASSERT_EQUALS_EPSILON macro
   - more colors on the console output, which can be disabled
   - colors are disabled by default when compiled in MS Visual
   - removed remaining catalan messages and code comments
   - UsageExample.cxx now uses all macros and features
version 2.3 2006-02-13 
   - added usage example and SConstruct
version 2.2 2004-11-28 
   - code in english and tests suites
version 2.1 2004-11-04 
   - char* especialization
version 2.0 2004-10-26 
   - Tests Factory
version 1.0 2003-10-28 
   - Initial

Old releases

On testing and related projects

Related projects

Screenshots

Green! all 4 automatic tests are passing, so do not show any detail

Red! 3 tests are failing, so it shows the reason and location of failure.

Screenshot of gvim editing a simple example. Adding a new tests fixture is really simple, just add a new source file and compile it. The static factory collects all the tests.

Catalan localization screenshots