~ubuntu-branches/ubuntu/wily/psi/wily-proposed

« back to all changes in this revision

Viewing changes to third-party/cppunit/cppunit/src/cppunit/BriefTestProgressListener.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2009-09-25 17:49:51 UTC
  • mfrom: (6.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090925174951-lvm7kdap82o8xhn3
Tags: 0.13-1
* Updated to upstream version 0.13
* Set Standards-Version to 3.8.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <cppunit/BriefTestProgressListener.h>
2
 
#include <cppunit/Test.h>
3
 
#include <cppunit/TestFailure.h>
4
 
#include <cppunit/portability/Stream.h>
5
 
 
6
 
 
7
 
CPPUNIT_NS_BEGIN
8
 
 
9
 
 
10
 
BriefTestProgressListener::BriefTestProgressListener()
11
 
    : m_lastTestFailed( false )
12
 
{
13
 
}
14
 
 
15
 
 
16
 
BriefTestProgressListener::~BriefTestProgressListener()
17
 
{
18
 
}
19
 
 
20
 
 
21
 
void 
22
 
BriefTestProgressListener::startTest( Test *test )
23
 
{
24
 
  stdCOut() << test->getName();
25
 
  stdCOut().flush();
26
 
 
27
 
  m_lastTestFailed = false;
28
 
}
29
 
 
30
 
 
31
 
void 
32
 
BriefTestProgressListener::addFailure( const TestFailure &failure )
33
 
{
34
 
  stdCOut() << " : " << (failure.isError() ? "error" : "assertion");
35
 
  m_lastTestFailed  = true;
36
 
}
37
 
 
38
 
 
39
 
void 
40
 
BriefTestProgressListener::endTest( Test *test )
41
 
{
42
 
  if ( !m_lastTestFailed )
43
 
    stdCOut()  <<  " : OK";
44
 
  stdCOut() << "\n";
45
 
}
46
 
 
47
 
 
48
 
CPPUNIT_NS_END
49