Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorPhil Nash2015-05-20 18:28:22 +0100
committerPhil Nash2015-05-20 18:28:22 +0100
commit6ed74b5cab3d8cfb2e474b2da1cad70e52cbb3b8 (patch)
tree0186cb15e05fdcfe293f07f44bb668175a3b39bf /include
parentbdbfe69e3c1b85230f32613770b58abcdaf0265b (diff)
downloadcatch3-6ed74b5cab3d8cfb2e474b2da1cad70e52cbb3b8.tar.gz
changed hex threshold on ints to 255
- and print it in *addition* to the decimal form
Diffstat (limited to 'include')
-rw-r--r--include/internal/catch_tostring.hpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/include/internal/catch_tostring.hpp b/include/internal/catch_tostring.hpp
index c4b3f152..60f8f823 100644
--- a/include/internal/catch_tostring.hpp
+++ b/include/internal/catch_tostring.hpp
@@ -98,19 +98,17 @@ std::string toString( wchar_t* const value )
std::string toString( int value ) {
std::ostringstream oss;
- if( value > 8192 )
- oss << "0x" << std::hex << value;
- else
- oss << value;
+ oss << value;
+ if( value >= 255 )
+ oss << " (0x" << std::hex << value << ")";
return oss.str();
}
std::string toString( unsigned long value ) {
std::ostringstream oss;
- if( value > 8192 )
- oss << "0x" << std::hex << value;
- else
- oss << value;
+ oss << value;
+ if( value >= 255 )
+ oss << " (0x" << std::hex << value << ")";
return oss.str();
}