From 6d56d71318cca7ae88a453a413aa167bd33a7735 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Tue, 12 Mar 2013 18:49:37 +0000 Subject: [PATCH] build 24 --- README | 2 +- include/internal/catch_version.hpp | 2 +- .../SelfTest/Baselines/approvedResults.txt | 4 +-- single_include/catch.hpp | 32 +++++++++++++------ 4 files changed, 27 insertions(+), 13 deletions(-) diff --git a/README b/README index 098e5dfc..1b4aace1 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -CATCH v0.9 build 23 (integration branch) +CATCH v0.9 build 24 (integration branch) --------------------------------------------- CATCH is an automated test framework for C, C++ and Objective-C. diff --git a/include/internal/catch_version.hpp b/include/internal/catch_version.hpp index e1485d5c..3f447bcc 100644 --- a/include/internal/catch_version.hpp +++ b/include/internal/catch_version.hpp @@ -13,7 +13,7 @@ namespace Catch { // These numbers are maintained by a script - Version libraryVersion( 0, 9, 23, "integration" ); + Version libraryVersion( 0, 9, 24, "integration" ); } #endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED diff --git a/projects/SelfTest/Baselines/approvedResults.txt b/projects/SelfTest/Baselines/approvedResults.txt index e03921ad..18ee4ec4 100644 --- a/projects/SelfTest/Baselines/approvedResults.txt +++ b/projects/SelfTest/Baselines/approvedResults.txt @@ -1,5 +1,5 @@ -CatchSelfTest is a CATCH v0.9 b23 (integration) host application. +CatchSelfTest is a CATCH v0.9 b24 (integration) host application. Run with -? for options ------------------------------------------------------------------------------- @@ -4286,7 +4286,7 @@ with expansion: 101 test cases - 47 failed (625 assertions - 104 failed) -CatchSelfTest is a CATCH v0.9 b23 (integration) host application. +CatchSelfTest is a CATCH v0.9 b24 (integration) host application. Run with -? for options ------------------------------------------------------------------------------- diff --git a/single_include/catch.hpp b/single_include/catch.hpp index b08b6d6f..f28c6a08 100644 --- a/single_include/catch.hpp +++ b/single_include/catch.hpp @@ -1,6 +1,6 @@ /* - * CATCH v0.9 build 23 (integration branch) - * Generated: 2013-03-11 18:35:52.716695 + * CATCH v0.9 build 24 (integration branch) + * Generated: 2013-03-12 18:45:29.590076 * ---------------------------------------------------------- * This file has been merged from multiple headers. Please don't edit it directly * Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved. @@ -98,6 +98,9 @@ namespace Catch { inline bool contains( const std::string& s, const std::string& infix ) { return s.find( infix ) != std::string::npos; } + inline void toLower( std::string& s ) { + std::transform( s.begin(), s.end(), s.begin(), ::tolower ); + } struct pluralise { pluralise( std::size_t count, const std::string& label ) @@ -633,9 +636,13 @@ inline std::string toString( std::nullptr_t ) { #ifdef __OBJC__ inline std::string toString( NSString const * const& nsstring ) { + if( !nsstring ) + return "nil"; return std::string( "@\"" ) + [nsstring UTF8String] + "\""; } inline std::string toString( NSString * CATCH_ARC_STRONG const& nsstring ) { + if( !nsstring ) + return "nil"; return std::string( "@\"" ) + [nsstring UTF8String] + "\""; } inline std::string toString( NSObject* const& nsObject ) { @@ -1434,7 +1441,9 @@ namespace Catch { private: virtual void acceptTag( const std::string& tag ) { - m_tags.insert( tag ); + std::string lcTag = tag; + toLower( lcTag ); + m_tags.insert( lcTag ); } virtual void acceptChar( char c ) { m_remainder += c; @@ -1477,7 +1486,9 @@ namespace Catch { typedef std::map TagMap; public: void add( const Tag& tag ) { - m_tags.insert( std::make_pair( tag.getName(), tag ) ); + std::string tagName = tag.getName(); + toLower( tagName ); + m_tags.insert( std::make_pair( tagName, tag ) ); } bool empty() const { @@ -1579,6 +1590,8 @@ namespace Catch { m_filterType( matchBehaviour ), m_wildcardPosition( NoWildcard ) { + toLower( m_stringToMatch ); + if( m_filterType == IfFilterMatches::AutoDetectBehaviour ) { if( startsWith( m_stringToMatch, "exclude:" ) ) { m_stringToMatch = m_stringToMatch.substr( 8 ); @@ -1618,7 +1631,8 @@ namespace Catch { #endif bool isMatch( const TestCase& testCase ) const { - const std::string& name = testCase.getTestCaseInfo().name; + std::string name = testCase.getTestCaseInfo().name; + toLower( name ); switch( m_wildcardPosition ) { case NoWildcard: @@ -5459,16 +5473,16 @@ namespace { std::cout << colourEscape << "[0m"; // white/ normal break; case ResultError: - std::cout << colourEscape << "[0;31m"; // red + std::cout << colourEscape << "[1;31m"; // bold red break; case ResultSuccess: - std::cout << colourEscape << "[0;32m"; // green + std::cout << colourEscape << "[1;32m"; // bold green break; case Error: std::cout << colourEscape << "[1;31m"; // bold red break; case Success: - std::cout << colourEscape << "[1;32m"; // bold green + std::cout << colourEscape << "[0;32m"; // green break; case OriginalExpression: std::cout << colourEscape << "[0;36m"; // cyan @@ -5870,7 +5884,7 @@ namespace Catch { namespace Catch { // These numbers are maintained by a script - Version libraryVersion( 0, 9, 23, "integration" ); + Version libraryVersion( 0, 9, 24, "integration" ); } // #included from: catch_line_wrap.hpp