Reworked stringification layer, removed Catch::toString

Now the order of stringification checks is

1) StringMaker specialization
2) operator<<

toString overloads and specializations have been removed.
This commit is contained in:
Martin Hořeňovský 2017-05-02 23:51:03 +02:00
parent 40130e59b4
commit 33ed1773f4
20 changed files with 626 additions and 557 deletions

View file

@ -114,7 +114,7 @@ namespace Detail {
std::string toString() const {
std::ostringstream oss;
oss << "Approx( " << Catch::toString( m_value ) << " )";
oss << "Approx( " << ::Catch::Detail::stringify( m_value ) << " )";
return oss.str();
}
@ -127,9 +127,11 @@ namespace Detail {
}
template<>
inline std::string toString<Detail::Approx>( Detail::Approx const& value ) {
return value.toString();
}
struct StringMaker<Catch::Detail::Approx> {
std::string operator()(Catch::Detail::Approx const& value) {
return value.toString();
}
};
} // end namespace Catch