mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-22 20:45:39 +02:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -58,7 +58,7 @@ namespace Catch {
|
||||
matchedTests++;
|
||||
Text nameWrapper( it->getTestCaseInfo().name,
|
||||
TextAttributes()
|
||||
.setWidth( maxNameLen )
|
||||
.setWidth( maxNameLen+2 )
|
||||
.setInitialIndent(2)
|
||||
.setIndent(4) );
|
||||
|
||||
|
@@ -67,8 +67,8 @@ namespace Catch {
|
||||
}
|
||||
|
||||
#define INTERNAL_CATCH_REGISTER_LEGACY_REPORTER( name, reporterType ) \
|
||||
Catch::LegacyReporterRegistrar<reporterType> catch_internal_RegistrarFor##reporterType( name );
|
||||
namespace{ Catch::LegacyReporterRegistrar<reporterType> catch_internal_RegistrarFor##reporterType( name ); }
|
||||
#define INTERNAL_CATCH_REGISTER_REPORTER( name, reporterType ) \
|
||||
Catch::ReporterRegistrar<reporterType> catch_internal_RegistrarFor##reporterType( name );
|
||||
namespace{ Catch::ReporterRegistrar<reporterType> catch_internal_RegistrarFor##reporterType( name ); }
|
||||
|
||||
#endif // TWOBLUECUBES_CATCH_REPORTER_REGISTRARS_HPP_INCLUDED
|
||||
|
@@ -121,9 +121,10 @@ namespace Catch {
|
||||
}
|
||||
|
||||
bool matches( std::set<std::string> const& tags ) const {
|
||||
TagMap::const_iterator it = m_tags.begin();
|
||||
TagMap::const_iterator itEnd = m_tags.end();
|
||||
for(; it != itEnd; ++it ) {
|
||||
for( TagMap::const_iterator
|
||||
it = m_tags.begin(), itEnd = m_tags.end();
|
||||
it != itEnd;
|
||||
++it ) {
|
||||
bool found = tags.find( it->first ) != tags.end();
|
||||
if( found == it->second.isNegated() )
|
||||
return false;
|
||||
@@ -138,9 +139,10 @@ namespace Catch {
|
||||
class TagExpression {
|
||||
public:
|
||||
bool matches( std::set<std::string> const& tags ) const {
|
||||
std::vector<TagSet>::const_iterator it = m_tagSets.begin();
|
||||
std::vector<TagSet>::const_iterator itEnd = m_tagSets.end();
|
||||
for(; it != itEnd; ++it )
|
||||
for( std::vector<TagSet>::const_iterator
|
||||
it = m_tagSets.begin(), itEnd = m_tagSets.end();
|
||||
it != itEnd;
|
||||
++it )
|
||||
if( it->matches( tags ) )
|
||||
return true;
|
||||
return false;
|
||||
@@ -173,6 +175,7 @@ namespace Catch {
|
||||
break;
|
||||
case ',':
|
||||
m_exp.m_tagSets.push_back( m_currentTagSet );
|
||||
m_currentTagSet = TagSet();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -23,7 +23,10 @@ namespace Catch {
|
||||
std::string remainder = _str;
|
||||
|
||||
while( !remainder.empty() ) {
|
||||
assert( lines.size() < 1000 );
|
||||
if( lines.size() >= 1000 ) {
|
||||
lines.push_back( "... message truncated due to excessive size" );
|
||||
return;
|
||||
}
|
||||
std::size_t tabPos = std::string::npos;
|
||||
std::size_t width = (std::min)( remainder.size(), _attr.width - indent );
|
||||
std::size_t pos = remainder.find_first_of( '\n' );
|
||||
|
@@ -13,7 +13,7 @@
|
||||
namespace Catch {
|
||||
|
||||
// These numbers are maintained by a script
|
||||
Version libraryVersion( 1, 0, 10, "master" );
|
||||
Version libraryVersion( 1, 0, 11, "master" );
|
||||
}
|
||||
|
||||
#endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED
|
||||
|
Reference in New Issue
Block a user