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/ToStringTuple.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/ToStringTuple.cpp')
| -rw-r--r-- | projects/SelfTest/ToStringTuple.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/projects/SelfTest/ToStringTuple.cpp b/projects/SelfTest/ToStringTuple.cpp index 9c855715..dcd1d803 100644 --- a/projects/SelfTest/ToStringTuple.cpp +++ b/projects/SelfTest/ToStringTuple.cpp @@ -5,42 +5,42 @@ TEST_CASE( "tuple<>", "[toString][tuple][c++11][.]" ) { typedef std::tuple<> type; - CHECK( "{ }" == Catch::toString(type{}) ); + CHECK( "{ }" == ::Catch::Detail::stringify(type{}) ); type value {}; - CHECK( "{ }" == Catch::toString(value) ); + CHECK( "{ }" == ::Catch::Detail::stringify(value) ); } TEST_CASE( "tuple<int>", "[toString][tuple][c++11][.]" ) { typedef std::tuple<int> type; - CHECK( "{ 0 }" == Catch::toString(type{0}) ); + CHECK( "{ 0 }" == ::Catch::Detail::stringify(type{0}) ); } TEST_CASE( "tuple<float,int>", "[toString][tuple][c++11][.]" ) { typedef std::tuple<float,int> type; - CHECK( "1.2f" == Catch::toString(float(1.2)) ); - CHECK( "{ 1.2f, 0 }" == Catch::toString(type{1.2f,0}) ); + CHECK( "1.2f" == ::Catch::Detail::stringify(float(1.2)) ); + CHECK( "{ 1.2f, 0 }" == ::Catch::Detail::stringify(type{1.2f,0}) ); } TEST_CASE( "tuple<string,string>", "[toString][tuple][c++11][.]" ) { typedef std::tuple<std::string,std::string> type; - CHECK( "{ \"hello\", \"world\" }" == Catch::toString(type{"hello","world"}) ); + CHECK( "{ \"hello\", \"world\" }" == ::Catch::Detail::stringify(type{"hello","world"}) ); } TEST_CASE( "tuple<tuple<int>,tuple<>,float>", "[toString][tuple][c++11][.]" ) { typedef std::tuple<std::tuple<int>,std::tuple<>,float> type; type value { std::tuple<int>{42}, {}, 1.2f }; - CHECK( "{ { 42 }, { }, 1.2f }" == Catch::toString(value) ); + CHECK( "{ { 42 }, { }, 1.2f }" == ::Catch::Detail::stringify(value) ); } TEST_CASE( "tuple<nullptr,int,const char *>", "[toString][tuple][c++11][.]" ) { typedef std::tuple<std::nullptr_t,int,const char *> type; type value { nullptr, 42, "Catch me" }; - CHECK( "{ nullptr, 42, \"Catch me\" }" == Catch::toString(value) ); + CHECK( "{ nullptr, 42, \"Catch me\" }" == ::Catch::Detail::stringify(value) ); } |