mirror of
https://github.com/catchorg/Catch2.git
synced 2025-06-03 10:27:57 +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
|
@ -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" );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue