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

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2008-08-28 18:46:52 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080828184652-iiik12dl91nq7cdi
Tags: 0.12-2
Uploading to unstable (Closes: Bug#494352)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <cppunit/extensions/TestNamer.h>
 
2
#include <cppunit/extensions/TypeInfoHelper.h>
 
3
#include <string>
 
4
 
 
5
 
 
6
CPPUNIT_NS_BEGIN
 
7
 
 
8
 
 
9
#if CPPUNIT_HAVE_RTTI
 
10
TestNamer::TestNamer( const std::type_info &typeInfo )
 
11
{
 
12
  m_fixtureName = TypeInfoHelper::getClassName( typeInfo );
 
13
}
 
14
#endif
 
15
 
 
16
 
 
17
TestNamer::TestNamer( const std::string &fixtureName )
 
18
  : m_fixtureName( fixtureName )
 
19
{
 
20
}
 
21
 
 
22
 
 
23
TestNamer::~TestNamer()
 
24
{
 
25
}
 
26
 
 
27
 
 
28
std::string 
 
29
TestNamer::getFixtureName() const
 
30
{
 
31
  return m_fixtureName;
 
32
}
 
33
 
 
34
 
 
35
std::string 
 
36
TestNamer::getTestNameFor( const std::string &testMethodName ) const
 
37
{
 
38
  return getFixtureName() + "::" + testMethodName;
 
39
}
 
40
 
 
41
 
 
42
 
 
43
 
 
44
CPPUNIT_NS_END