summaryrefslogtreecommitdiffstats
blob: eec9be9734485a9c7d0a562846c200c86ddae587 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <cppunit/extensions/TestNamer.h>
#include <cppunit/extensions/TypeInfoHelper.h>
#include <string>


CPPUNIT_NS_BEGIN


#if CPPUNIT_HAVE_RTTI
TestNamer::TestNamer( const std::type_info &typeInfo )
{
  m_fixtureName = TypeInfoHelper::getClassName( typeInfo );
}
#endif


TestNamer::TestNamer( const std::string &fixtureName )
  : m_fixtureName( fixtureName )
{
}


TestNamer::~TestNamer()
{
}


std::string 
TestNamer::getFixtureName() const
{
  return m_fixtureName;
}


std::string 
TestNamer::getTestNameFor( const std::string &testMethodName ) const
{
  return getFixtureName() + "::" + testMethodName;
}




CPPUNIT_NS_END