Update of /cvsroot/cppunit/cppunit2/src/cpput
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10323/src/cpput
Modified Files:
cpput.vcproj
Added Files:
extendeddata.cpp
Log Message:
Added possibility to add test to a fixture and set its description and time-out (and other specifics).
Index: cpput.vcproj
===================================================================
RCS file: /cvsroot/cppunit/cppunit2/src/cpput/cpput.vcproj,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** cpput.vcproj 20 Jul 2005 21:06:51 -0000 1.36
--- cpput.vcproj 6 Aug 2005 22:24:53 -0000 1.37
***************
*** 133,140 ****
Filter="">
<File
! RelativePath="..\cpputtest\SConscript">
</File>
<File
! RelativePath=".\SConscript">
</File>
<File
--- 133,140 ----
Filter="">
<File
! RelativePath=".\SConscript">
</File>
<File
! RelativePath="..\cpputtest\SConscript">
</File>
<File
***************
*** 442,445 ****
--- 442,451 ----
</File>
<File
+ RelativePath=".\extendeddata.cpp">
+ </File>
+ <File
+ RelativePath="..\..\include\cpput\extendeddata.h">
+ </File>
+ <File
RelativePath="..\..\include\cpput\forwards.h">
</File>
--- NEW FILE: extendeddata.cpp ---
#include <cpput/extendeddata.h>
#include <cpput/test.h>
namespace CppUT {
TestExtendedDataHelper::TestExtendedDataHelper( Test &test )
: test_( test )
{
}
TestExtendedDataHelper::~TestExtendedDataHelper()
{
}
Test &
TestExtendedDataHelper::operator()( const TestExtendedData &data ) const
{
data.apply( test_ );
return test_;
}
TestExtendedData::~TestExtendedData()
{
}
TestExtendedDataList
TestExtendedData::operator ,( const TestExtendedData &other ) const
{
return TestExtendedDataList( *this, other );
}
TestExtendedDataList::TestExtendedDataList( const TestExtendedData &left,
const TestExtendedData &right )
: left_( left )
, right_( right )
{
}
void
TestExtendedDataList::apply( Test &test ) const
{
left_.apply( test );
right_.apply( test );
}
DescriptionData::DescriptionData( const std::string &description )
: description_( description )
{
}
void
DescriptionData::apply( Test &test ) const
{
test.setDescription( description_.c_str() );
}
TimeOutData::TimeOutData( double timeOutInSeconds )
: timeOutInSeconds_( timeOutInSeconds )
{
}
void
TimeOutData::apply( Test &test ) const
{
test.setTimeOut( timeOutInSeconds_ );
}
DependenciesData::DependenciesData( const std::string &dependencies )
: dependencies_( dependencies )
{
}
void
DependenciesData::apply( Test &test ) const
{
// test.setDependenciesFromPackedString( dependencies );
}
TestExtendedDataFactory::~TestExtendedDataFactory()
{
}
DescriptionData
TestExtendedDataFactory::describe( const std::string &description )
{
return DescriptionData( description );
}
TimeOutData
TestExtendedDataFactory::timeOut( double timeOutInSeconds )
{
return TimeOutData( timeOutInSeconds );
}
DependenciesData
TestExtendedDataFactory::depends( const std::string &dependencies )
{
return DependenciesData( dependencies );
}
} // namespace CppUT
|