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

« back to all changes in this revision

Viewing changes to third-party/cppunit/cppunit/src/cppunit/TextTestResult.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/Exception.h>
2
 
#include <cppunit/Test.h>
3
 
#include <cppunit/TestFailure.h>
4
 
#include <cppunit/TextTestResult.h>
5
 
#include <cppunit/TextOutputter.h>
6
 
#include <cppunit/portability/Stream.h>
7
 
 
8
 
 
9
 
CPPUNIT_NS_BEGIN
10
 
 
11
 
 
12
 
TextTestResult::TextTestResult()
13
 
{
14
 
  addListener( this );
15
 
}
16
 
 
17
 
 
18
 
void 
19
 
TextTestResult::addFailure( const TestFailure &failure )
20
 
{
21
 
  TestResultCollector::addFailure( failure );
22
 
  stdCOut() << ( failure.isError() ? "E" : "F" );
23
 
}
24
 
 
25
 
 
26
 
void 
27
 
TextTestResult::startTest( Test *test )
28
 
{
29
 
  TestResultCollector::startTest (test);
30
 
  stdCOut() << ".";
31
 
}
32
 
 
33
 
 
34
 
void 
35
 
TextTestResult::print( OStream &stream ) 
36
 
{
37
 
  TextOutputter outputter( this, stream );
38
 
  outputter.write();
39
 
}
40
 
 
41
 
 
42
 
OStream &
43
 
operator <<( OStream &stream, 
44
 
             TextTestResult &result )
45
 
46
 
  result.print (stream); return stream; 
47
 
}
48
 
 
49
 
 
50
 
CPPUNIT_NS_END