mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-24 13:39:24 +00:00
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:
parent
40130e59b4
commit
33ed1773f4
20 changed files with 626 additions and 557 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue