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

@ -14,15 +14,11 @@
#include "catch.hpp"
namespace Catch
{
template<>
std::string toString<std::pair<int, int> >( const std::pair<int, int>& value )
{
namespace Catch {
std::string toString( const std::pair<int, int>& value ) {
std::ostringstream oss;
oss << "std::pair( " << value.first << ", " << value.second << " )";
return oss.str();
}
}
@ -340,7 +336,7 @@ struct Awkward
TEST_CASE( "non streamable - with conv. op", "[Tricky]" )
{
Awkward awkward;
std::string s = Catch::toString( awkward );
std::string s = ::Catch::Detail::stringify( awkward );
REQUIRE( s == "7" );
}