CppUnit project page CppUnit home page

Test fixture


Classes

class  CppUT::TestExtendedDataHelper
 Helper to set test extended data (description, time-out, dependencies...)

Example of usage:. More...

class  CppUT::TestExtendedData
class  CppUT::TestExtendedDataList
class  CppUT::DescriptionData
class  CppUT::TimeOutData
class  CppUT::DependenciesData
class  CppUT::GroupData
class  CppUT::TestExtendedDataFactory
class  CppUT::TestFixture

Defines

#define CPPUT_TESTSUITE_BEGIN(FixtureType)
#define CPPUT_TESTSUITE_EXTEND(FixtureType, ParentFixtureType)
#define CPPUT_TESTSUITE_END()
#define CPPUT_ABSTRACT_TESTSUITE_END()   }
#define CPPUT_TEST(testMethod)
#define CPPUT_TEST_WITH_SPECIFICS(testMethod, specifics)

Define Documentation

 
#define CPPUT_ABSTRACT_TESTSUITE_END (  )     }

#define CPPUT_TEST ( testMethod   ) 

Value:

fixture = fixtureFactory();                                            \
      suite->add( ::CppUT::makeFixtureTestCase( fixture,                     \
                   ::CppTL::memfn0( fixture,                                 \
                                    &CppUT_ThisType::testMethod ),           \
                   #testMethod ) )

#define CPPUT_TEST_WITH_SPECIFICS ( testMethod,
specifics   ) 

Value:

fixture = fixtureFactory();                                            \
      addTestWithSpecifics( *suite,                                          \
                            ::CppUT::makeFixtureTestCase( fixture,           \
                               ::CppTL::memfn0( fixture,                     \
                                  &CppUT_ThisType::testMethod ),             \
                                                          #testMethod ),     \
                            specifics )

#define CPPUT_TESTSUITE_BEGIN ( FixtureType   ) 

Value:

public:                                                                      \
   typedef FixtureType CppUT_ThisType;                                       \
                                                                             \
   static std::string defaultSuiteName()                                     \
   {                                                                         \
      return CPPUT_TESTSUITE_NAME_FROM_TYPE( FixtureType );                  \
   }                                                                         \
                                                                             \
   static void addTests_( const ::CppUT::TestSuitePtr &suite,                \
                          ::CppUT::Impl::FixtureFactory &factory_ )          \
   {                                                                         \
      ::CppUT::Impl::FixtureFactoryWrapper<CppUT_ThisType> fixtureFactory(   \
         factory_ );                                                         \
      ::CppTL::IntrusivePtr<FixtureType> fixture

 
#define CPPUT_TESTSUITE_END (  ) 

Value:

}                                                                          \
                                                                              \
   static ::CppUT::TestPtr suite( const std::string &name = std::string("") ) \
   {                                                                          \
      std::string suiteName = name;                                           \
      if ( suiteName.empty() )                                                \
          suiteName = defaultSuiteName();                                     \
      ::CppUT::TestSuitePtr testSuite = ::CppUT::makeTestSuite( suiteName );  \
      ::CppUT::Impl::FixtureFactoryImpl<CppUT_ThisType> factory;              \
      addTests_( testSuite, factory );                                        \
      return ::CppTL::staticPointerCast< ::CppUT::Test >( testSuite );        \
   }

#define CPPUT_TESTSUITE_EXTEND ( FixtureType,
ParentFixtureType   ) 

Value:

CPPUT_TESTSUITE_BEGIN( FixtureType );                                  \
      ParentFixtureType::addTests_( suite, factory_ )


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