blob: b5e096c6d99090f73a8cd7ffab7dab8c5a045f47 (
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
|
#include <cppunit/extensions/TestNamer.h>
#include <cppunit/extensions/TypeInfoHelper.h>
#include <string>
namespace CppUnit
{
#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 )
{
}
std::string
TestNamer::getFixtureName() const
{
return m_fixtureName;
}
std::string
TestNamer::getTestNameFor( const std::string &testMethodName ) const
{
return getFixtureName() + "::" + testMethodName;
}
} // namespace CppUnit
|