CppUnit project page FAQ CppUnit home page

TestNamer.h File Reference

#include <cppunit/Portability.h>
#include <string>

Include dependency graph for TestNamer.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  TestNamer
 Names a test or a fixture suite. More...


#define CPPUNIT_TESTNAMER_DECL(variableName, FixtureType)   CPPUNIT_NS::TestNamer variableName( std::string(#FixtureType) )
 Declares a TestNamer.

Define Documentation

#define CPPUNIT_TESTNAMER_DECL ( variableName,
FixtureType   )     CPPUNIT_NS::TestNamer variableName( std::string(#FixtureType) )

Declares a TestNamer.

Declares a TestNamer for the specified type, using RTTI if enabled, otherwise using macro string expansion.

RTTI is used if CPPUNIT_USE_TYPEINFO_NAME is defined and not null.

 void someMethod() 
   CPPUNIT_TESTNAMER_DECL( namer, AFixtureType );
   std::string fixtureName = namer.getFixtureName();

See also:

SourceForge Logo hosts this site. Send comments to:
CppUnit Developers