From a5a013811cf9d0fd4e9d36844ccf260866e885b4 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Tue, 14 Feb 2017 09:04:26 +0000 Subject: [PATCH] Renamed toStringUncached -> describe --- include/internal/catch_matchers.hpp | 10 +++++----- include/internal/catch_matchers_string.h | 2 +- include/internal/catch_matchers_string.hpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/internal/catch_matchers.hpp b/include/internal/catch_matchers.hpp index d241c874..d11a8212 100644 --- a/include/internal/catch_matchers.hpp +++ b/include/internal/catch_matchers.hpp @@ -22,12 +22,12 @@ namespace Matchers { public: std::string toString() const { if( m_cachedToString.empty() ) - m_cachedToString = toStringUncached(); + m_cachedToString = describe(); return m_cachedToString; } protected: - virtual std::string toStringUncached() const = 0; + virtual std::string describe() const = 0; mutable std::string m_cachedToString; }; @@ -50,7 +50,7 @@ namespace Matchers { } return true; } - virtual std::string toStringUncached() const CATCH_OVERRIDE { + virtual std::string describe() const CATCH_OVERRIDE { std::string description; description.reserve( 4 + m_matchers.size()*32 ); description += "( "; @@ -80,7 +80,7 @@ namespace Matchers { } return false; } - virtual std::string toStringUncached() const CATCH_OVERRIDE { + virtual std::string describe() const CATCH_OVERRIDE { std::string description; description.reserve( 4 + m_matchers.size()*32 ); description += "( "; @@ -110,7 +110,7 @@ namespace Matchers { return !m_underlyingMatcher.match( arg ); } - virtual std::string toStringUncached() const CATCH_OVERRIDE { + virtual std::string describe() const CATCH_OVERRIDE { return "not " + m_underlyingMatcher.toString(); } MatcherBase const& m_underlyingMatcher; diff --git a/include/internal/catch_matchers_string.h b/include/internal/catch_matchers_string.h index 64c52993..5cdad507 100644 --- a/include/internal/catch_matchers_string.h +++ b/include/internal/catch_matchers_string.h @@ -27,7 +27,7 @@ namespace Matchers { struct StringMatcherBase : Impl::MatcherBase { StringMatcherBase( std::string operation, CasedString const& comparator ); - virtual std::string toStringUncached() const CATCH_OVERRIDE; + virtual std::string describe() const CATCH_OVERRIDE; CasedString m_comparator; std::string m_operation; diff --git a/include/internal/catch_matchers_string.hpp b/include/internal/catch_matchers_string.hpp index edff6822..107d8e2d 100644 --- a/include/internal/catch_matchers_string.hpp +++ b/include/internal/catch_matchers_string.hpp @@ -34,7 +34,7 @@ namespace Matchers { m_operation( operation ) { } - std::string StringMatcherBase::toStringUncached() const { + std::string StringMatcherBase::describe() const { std::string description; description.reserve(5 + m_operation.size() + m_comparator.m_str.size() + m_comparator.caseSensitivitySuffix().size());