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ý committed 2017-05-02 23:51:03 +02:00
1 parent 40130e59b4
commit 33ed1773f4
20 files changed
+626 -557

No files matched your search

+6 -4
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