Fixed string indexing bug

This commit is contained in:
Phil Nash
2013-09-07 12:07:38 +01:00
parent 04a3364b5a
commit f7378eebb6
6 changed files with 17 additions and 9 deletions

View File

@@ -111,7 +111,7 @@ namespace Catch {
inline std::string extractClassName( std::string const& classOrQualifiedMethodName ) {
std::string className = classOrQualifiedMethodName;
if( className[0] == '&' )
if( startsWith( className, "&" ) )
{
std::size_t lastColons = className.rfind( "::" );
std::size_t penultimateColons = className.rfind( "::", lastColons-1 );

View File

@@ -13,7 +13,7 @@
namespace Catch {
// These numbers are maintained by a script
Version libraryVersion( 1, 0, 8, "master" );
Version libraryVersion( 1, 0, 9, "master" );
}
#endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED