mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-25 05:59:24 +00:00
toString handles wchar_t raw strings
This commit is contained in:
parent
08dc8458c0
commit
7b0a84a048
3 changed files with 36 additions and 0 deletions
|
@ -84,6 +84,16 @@ std::string toString( char* const value ) {
|
|||
return Catch::toString( static_cast<const char*>( value ) );
|
||||
}
|
||||
|
||||
std::string toString( const wchar_t* const value )
|
||||
{
|
||||
return value ? Catch::toString( std::wstring(value) ) : std::string( "{null string}" );
|
||||
}
|
||||
|
||||
std::string toString( wchar_t* const value )
|
||||
{
|
||||
return Catch::toString( static_cast<const wchar_t*>( value ) );
|
||||
}
|
||||
|
||||
std::string toString( int value ) {
|
||||
std::ostringstream oss;
|
||||
oss << value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue