Name
TextTestProgressListener
Description
The class
TextTestProgressListener
(see Figure C-35) is a
subclass of TestListener. It prints a textual
“progress bar” indicating the
progress of a series of tests as they are run. A sample of its output
is shown here:
....F...E...
This shows that 10 tests were run, and 1 failure and 1 error occurred.
TextTestProgressListener belongs to the namespace
CppUnit. It is declared in
TextTestProgressListener.h and implemented in
TextTestProgressListener.cpp.
![]() |
Declaration
class TextTestProgressListener : public TestListener
Constructors/Destructors
-
TextTestProgressListener( ) A constructor.
-
virtual ~TextTestProgressListener( ) A destructor.
Public Methods
-
void addFailure(const TestFailure &failure) A method that informs
TextTestProgressListenerof aTestFailure. If theTestFailureis an assertion failure, anFis printed; otherwise, anEis printed.-
void done( ) Prints a carriage return and flushes the output stream to complete the output.
-
void startTest(Test *test) A method that informs
TextTestProgressListenerthat aTestis about to be run. A period (.)is printed to indicate progress.
Protected/Private Methods
-
TextTestProgressListener(const TextTestProgressListener& copy) A copy constructor, scoped
privateto prevent its use.-
void operator=(const TextTestProgressListener& copy) A copy operator, scoped
private ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access
