diff options
| author | Martin Hořeňovský | 2017-05-02 23:51:03 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2017-05-02 23:51:03 +0200 |
| commit | 33ed1773f40b406dbf3b7201bf52694bd86b1503 (patch) | |
| tree | 57aa3b7d82e3fcc2b8b99222515ec2d26b22a66a /projects/SelfTest/ToStringVector.cpp | |
| parent | 40130e59b4b13f9e4c9962a8ffb19448c94b7c0f (diff) | |
| download | catch3-33ed1773f40b406dbf3b7201bf52694bd86b1503.tar.gz | |
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.
Diffstat (limited to 'projects/SelfTest/ToStringVector.cpp')
| -rw-r--r-- | projects/SelfTest/ToStringVector.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/projects/SelfTest/ToStringVector.cpp b/projects/SelfTest/ToStringVector.cpp index eafe886d..c70872c8 100644 --- a/projects/SelfTest/ToStringVector.cpp +++ b/projects/SelfTest/ToStringVector.cpp @@ -6,21 +6,21 @@ TEST_CASE( "vector<int> -> toString", "[toString][vector]" ) { std::vector<int> vv; - REQUIRE( Catch::toString(vv) == "{ }" ); + REQUIRE( ::Catch::Detail::stringify(vv) == "{ }" ); vv.push_back( 42 ); - REQUIRE( Catch::toString(vv) == "{ 42 }" ); + REQUIRE( ::Catch::Detail::stringify(vv) == "{ 42 }" ); vv.push_back( 250 ); - REQUIRE( Catch::toString(vv) == "{ 42, 250 }" ); + REQUIRE( ::Catch::Detail::stringify(vv) == "{ 42, 250 }" ); } TEST_CASE( "vector<string> -> toString", "[toString][vector]" ) { std::vector<std::string> vv; - REQUIRE( Catch::toString(vv) == "{ }" ); + REQUIRE( ::Catch::Detail::stringify(vv) == "{ }" ); vv.push_back( "hello" ); - REQUIRE( Catch::toString(vv) == "{ \"hello\" }" ); + REQUIRE( ::Catch::Detail::stringify(vv) == "{ \"hello\" }" ); vv.push_back( "world" ); - REQUIRE( Catch::toString(vv) == "{ \"hello\", \"world\" }" ); + REQUIRE( ::Catch::Detail::stringify(vv) == "{ \"hello\", \"world\" }" ); } namespace { @@ -50,19 +50,19 @@ namespace { TEST_CASE( "vector<int,allocator> -> toString", "[toString][vector,allocator][c++11][.]" ) { std::vector<int,minimal_allocator<int> > vv; - REQUIRE( Catch::toString(vv) == "{ }" ); + REQUIRE( ::Catch::Detail::stringify(vv) == "{ }" ); vv.push_back( 42 ); - REQUIRE( Catch::toString(vv) == "{ 42 }" ); + REQUIRE( ::Catch::Detail::stringify(vv) == "{ 42 }" ); vv.push_back( 250 ); - REQUIRE( Catch::toString(vv) == "{ 42, 250 }" ); + REQUIRE( ::Catch::Detail::stringify(vv) == "{ 42, 250 }" ); } TEST_CASE( "vec<vec<string,alloc>> -> toString", "[toString][vector,allocator][c++11][.]" ) { using inner = std::vector<std::string, minimal_allocator<std::string>>; using vector = std::vector<inner>; vector v; - REQUIRE( Catch::toString(v) == "{ }" ); + REQUIRE( ::Catch::Detail::stringify(v) == "{ }" ); v.push_back( inner { "hello" } ); v.push_back( inner { "world" } ); - REQUIRE( Catch::toString(v) == "{ { \"hello\" }, { \"world\" } }" ); + REQUIRE( ::Catch::Detail::stringify(v) == "{ { \"hello\" }, { \"world\" } }" ); } |