The class CompilerOutputter (see Figure C-3) is a subclass of Outputter . It outputs test results in the format that the Microsoft Visual C++ (VC++) IDE uses for compiler errors, enabling the IDE to locate test assertions in the code.
CompilerOutputter belongs to the namespace CppUnit . It is declared in CompilerOutputter.h and implemented in CompilerOutputter.cpp .
class CompilerOutputter : public Outputter
Creates a CompilerOutputter to get test results from result and outputs them to stream .
A static method that returns a new CompilerOutputter .
Methods that write test results from m_result to m_stream . Called by write( ) .
Returns message with carriage returns inserted to fit 80-column output width.
A method called to output results. Depending on test success or failure, calls printSucess( ) or printFailureReport( ) , which in turn call the other print methods just described.
Breaks message into Lines ( private ).
A copy constructor, which is scoped private to prevent its use.
A copy operator, which is scoped private to prevent its use.
Defines the type Lines as a vector of string ( private ).
The TestResultCollector passed in the constructor ( private )
The output stream passed in the constructor ( private ).