Utilities and extensions for CppUnit
This repository contains some utilities for use with CppUnit.
Support QtCreator message parsing
There are two outputter classes derived from
- GccOutputter - prints test results in the same format as GCC error messages
- MSVCOutputter - prints test results in the same format as MSVC error messages
These were created for use with the QtCreator IDE. When tests are run automatically after a build the IDE parses the output and can display a list of test failures if the format of the output is the same as that of the current compiler. For this to work, the test main function should contain something like:
// Print test in a compiler compatible format. #ifndef _WIN32 GccOutputter outputter( &result, std::cout ); #else MSVCOutputter outputter( &result, std::cout ); #endif outputter.write();
The ```CompilerOutputter`` that is part of CppUnit did not produce the correct output for QtCreator.
QtStreamOperators.h contains some helper functions when using Qt. This enables the use of
and other Qt objects in
The files can be compiled into a library (a qmake build file is included) or just included directly with the test project.
More information on using the CppUnit with Qt creator is available here