diff --git a/include/internal/catch_tostring.hpp b/include/internal/catch_tostring.hpp index 21ee45f7..c4b3f152 100644 --- a/include/internal/catch_tostring.hpp +++ b/include/internal/catch_tostring.hpp @@ -98,7 +98,10 @@ std::string toString( wchar_t* const value ) std::string toString( int value ) { std::ostringstream oss; - oss << value; + if( value > 8192 ) + oss << "0x" << std::hex << value; + else + oss << value; return oss.str(); } diff --git a/projects/SelfTest/Baselines/console.sw.approved.txt b/projects/SelfTest/Baselines/console.sw.approved.txt index 54b7c915..7f6be8ec 100644 --- a/projects/SelfTest/Baselines/console.sw.approved.txt +++ b/projects/SelfTest/Baselines/console.sw.approved.txt @@ -3398,7 +3398,7 @@ MiscTests.cpp:: PASSED: REQUIRE( Factorial(10) == 3628800 ) with expansion: - 0x == 3628800 + 0x == 0x ------------------------------------------------------------------------------- An empty test with no assertions diff --git a/projects/SelfTest/Baselines/xml.sw.approved.txt b/projects/SelfTest/Baselines/xml.sw.approved.txt index 9a273fb6..612ed0bf 100644 --- a/projects/SelfTest/Baselines/xml.sw.approved.txt +++ b/projects/SelfTest/Baselines/xml.sw.approved.txt @@ -3519,7 +3519,7 @@ Factorial(10) == 3628800 - 0x == 3628800 + 0x == 0x