merge from upstream

This commit is contained in:
Malcolm Noyes
2013-12-11 20:57:42 +00:00
9 changed files with 51 additions and 71 deletions

View File

@@ -57,16 +57,6 @@ namespace Catch {
delete it->second;
}
template<typename ContainerT, typename Function>
inline void forEach( ContainerT& container, Function function ) {
std::for_each( container.begin(), container.end(), function );
}
template<typename ContainerT, typename Function>
inline void forEach( ContainerT const& container, Function function ) {
std::for_each( container.begin(), container.end(), function );
}
bool startsWith( std::string const& s, std::string const& prefix );
bool endsWith( std::string const& s, std::string const& suffix );
bool contains( std::string const& s, std::string const& infix );

View File

@@ -43,7 +43,7 @@ namespace Catch{
#endif
#ifndef CATCH_BREAK_INTO_DEBUGGER
#define CATCH_BREAK_INTO_DEBUGGER()
#define CATCH_BREAK_INTO_DEBUGGER() Catch::isTrue( true );
#endif
#endif // TWOBLUECUBES_CATCH_DEBUGGER_H_INCLUDED

View File

@@ -14,7 +14,7 @@ namespace Catch {
// These numbers are maintained by a script
template <typename T>
const T LibraryVersionInfo<T>::value( 1, 0, 16, "master" );
const T LibraryVersionInfo<T>::value( 1, 0, 17, "master" );
}
#endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED

View File

@@ -168,9 +168,9 @@ namespace Catch {
Ptr<TestRunNode> node = new TestRunNode( testRunStats );
node->children.swap( m_testGroups );
m_testRuns.push_back( node );
testRunEnded();
testRunEndedCumulative();
}
virtual void testRunEnded() = 0;
virtual void testRunEndedCumulative() = 0;
Ptr<IConfig> m_config;
std::ostream& stream;

View File

@@ -70,7 +70,7 @@ namespace Catch {
writeGroup( *m_testGroups.back(), suiteTime );
}
virtual void testRunEnded() {
virtual void testRunEndedCumulative() {
xml.endElement();
}

View File

@@ -59,7 +59,7 @@ namespace Catch {
virtual void StartSection( const std::string& sectionName, const std::string& description ) {
if( m_sectionDepth++ > 0 ) {
m_xml.startElement( "Section" )
.writeAttribute( "name", sectionName )
.writeAttribute( "name", trim( sectionName ) )
.writeAttribute( "description", description );
}
}
@@ -76,7 +76,7 @@ namespace Catch {
}
virtual void StartTestCase( const Catch::TestCaseInfo& testInfo ) {
m_xml.startElement( "TestCase" ).writeAttribute( "name", testInfo.name );
m_xml.startElement( "TestCase" ).writeAttribute( "name", trim( testInfo.name ) );
m_currentTestSuccess = true;
}