diff --git a/projects/SelfTest/Baselines/compact.sw.approved.txt b/projects/SelfTest/Baselines/compact.sw.approved.txt index 2c9b0b80..e7dafe5a 100644 --- a/projects/SelfTest/Baselines/compact.sw.approved.txt +++ b/projects/SelfTest/Baselines/compact.sw.approved.txt @@ -874,6 +874,9 @@ Xml.tests.cpp:: passed: encode( stringWithQuotes, Catch::XmlEncode: "don't "quote" me on that" Xml.tests.cpp:: passed: encode( "[/x01]" ) == "[//x01]" for: "[/x01]" == "[/x01]" Xml.tests.cpp:: passed: encode( "[/x7F]" ) == "[//x7F]" for: "[/x7F]" == "[/x7F]" +ToStringVector.tests.cpp:: passed: Catch::Detail::stringify( empty ) == "{ }" for: "{ }" == "{ }" +ToStringVector.tests.cpp:: passed: Catch::Detail::stringify( oneValue ) == "{ 42 }" for: "{ 42 }" == "{ 42 }" +ToStringVector.tests.cpp:: passed: Catch::Detail::stringify( twoValues ) == "{ 42, 250 }" for: "{ 42, 250 }" == "{ 42, 250 }" Misc.tests.cpp:: passed: x == 0 for: 0 == 0 Tricky.tests.cpp:: passed: obj.prop != 0 for: 0x != 0 Misc.tests.cpp:: passed: flag for: true diff --git a/projects/SelfTest/Baselines/console.std.approved.txt b/projects/SelfTest/Baselines/console.std.approved.txt index 9bb8e8c3..375fb71a 100644 --- a/projects/SelfTest/Baselines/console.std.approved.txt +++ b/projects/SelfTest/Baselines/console.std.approved.txt @@ -1064,6 +1064,6 @@ with expansion: "first" == "second" =============================================================================== -test cases: 194 | 143 passed | 47 failed | 4 failed as expected -assertions: 980 | 854 passed | 105 failed | 21 failed as expected +test cases: 195 | 144 passed | 47 failed | 4 failed as expected +assertions: 983 | 857 passed | 105 failed | 21 failed as expected diff --git a/projects/SelfTest/Baselines/console.sw.approved.txt b/projects/SelfTest/Baselines/console.sw.approved.txt index a457fa8d..57c3ca79 100644 --- a/projects/SelfTest/Baselines/console.sw.approved.txt +++ b/projects/SelfTest/Baselines/console.sw.approved.txt @@ -6852,6 +6852,30 @@ PASSED: with expansion: "[\x7F]" == "[\x7F]" +------------------------------------------------------------------------------- +array -> toString +------------------------------------------------------------------------------- +ToStringVector.tests.cpp: +............................................................................... + +ToStringVector.tests.cpp:: +PASSED: + REQUIRE( Catch::Detail::stringify( empty ) == "{ }" ) +with expansion: + "{ }" == "{ }" + +ToStringVector.tests.cpp:: +PASSED: + REQUIRE( Catch::Detail::stringify( oneValue ) == "{ 42 }" ) +with expansion: + "{ 42 }" == "{ 42 }" + +ToStringVector.tests.cpp:: +PASSED: + REQUIRE( Catch::Detail::stringify( twoValues ) == "{ 42, 250 }" ) +with expansion: + "{ 42, 250 }" == "{ 42, 250 }" + ------------------------------------------------------------------------------- atomic if ------------------------------------------------------------------------------- @@ -8222,6 +8246,6 @@ Misc.tests.cpp:: PASSED: =============================================================================== -test cases: 194 | 141 passed | 49 failed | 4 failed as expected -assertions: 979 | 850 passed | 108 failed | 21 failed as expected +test cases: 195 | 142 passed | 49 failed | 4 failed as expected +assertions: 982 | 853 passed | 108 failed | 21 failed as expected diff --git a/projects/SelfTest/Baselines/junit.sw.approved.txt b/projects/SelfTest/Baselines/junit.sw.approved.txt index 58d76e46..c7d422a8 100644 --- a/projects/SelfTest/Baselines/junit.sw.approved.txt +++ b/projects/SelfTest/Baselines/junit.sw.approved.txt @@ -1,7 +1,7 @@ - + @@ -698,6 +698,7 @@ Exception.tests.cpp: + diff --git a/projects/SelfTest/Baselines/xml.sw.approved.txt b/projects/SelfTest/Baselines/xml.sw.approved.txt index c3fc5265..18823424 100644 --- a/projects/SelfTest/Baselines/xml.sw.approved.txt +++ b/projects/SelfTest/Baselines/xml.sw.approved.txt @@ -7749,6 +7749,33 @@ Message from section two + + + + Catch::Detail::stringify( empty ) == "{ }" + + + "{ }" == "{ }" + + + + + Catch::Detail::stringify( oneValue ) == "{ 42 }" + + + "{ 42 }" == "{ 42 }" + + + + + Catch::Detail::stringify( twoValues ) == "{ 42, 250 }" + + + "{ 42, 250 }" == "{ 42, 250 }" + + + + @@ -9141,7 +9168,7 @@ loose text artifact - + - + diff --git a/projects/SelfTest/UsageTests/ToStringVector.tests.cpp b/projects/SelfTest/UsageTests/ToStringVector.tests.cpp index 0b993c4e..18e56c08 100644 --- a/projects/SelfTest/UsageTests/ToStringVector.tests.cpp +++ b/projects/SelfTest/UsageTests/ToStringVector.tests.cpp @@ -1,6 +1,6 @@ #include "catch.hpp" #include - +#include // vedctor TEST_CASE( "vector -> toString", "[toString][vector]" ) @@ -76,3 +76,11 @@ TEST_CASE( "vector -> toString", "[toString][containers][vector]" ) { bools.push_back(false); REQUIRE( ::Catch::Detail::stringify(bools) == "{ true, false }"); } +TEST_CASE( "array -> toString", "[toString][containers][array]" ) { + std::array empty; + REQUIRE( Catch::Detail::stringify( empty ) == "{ }" ); + std::array oneValue = {{ 42 }}; + REQUIRE( Catch::Detail::stringify( oneValue ) == "{ 42 }" ); + std::array twoValues = {{ 42, 250 }}; + REQUIRE( Catch::Detail::stringify( twoValues ) == "{ 42, 250 }" ); +} \ No newline at end of file