mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
toString( int ) uses hex for large values
now matches behaviour of unsigned int
This commit is contained in:
parent
bd9fbe25f6
commit
ff9e51df7f
@ -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();
|
||||
}
|
||||
|
||||
|
@ -3398,7 +3398,7 @@ MiscTests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( Factorial(10) == 3628800 )
|
||||
with expansion:
|
||||
0x<hex digits> == 3628800
|
||||
0x<hex digits> == 0x<hex digits>
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
An empty test with no assertions
|
||||
|
@ -3519,7 +3519,7 @@
|
||||
Factorial(10) == 3628800
|
||||
</Original>
|
||||
<Expanded>
|
||||
0x<hex digits> == 3628800
|
||||
0x<hex digits> == 0x<hex digits>
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
|
Loading…
Reference in New Issue
Block a user