mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
Add the possibility to define CATCH_CONFIG_NO_WSTRING to disable wstring support on platforms where it's not supported (AVR32, for example).
This commit is contained in:
parent
406917f793
commit
b7a21e47d4
@ -73,6 +73,7 @@ inline std::string toString( const std::string& value ) {
|
|||||||
return "\"" + value + "\"";
|
return "\"" + value + "\"";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CATCH_CONFIG_NO_WSTRING
|
||||||
inline std::string toString( const std::wstring& value ) {
|
inline std::string toString( const std::wstring& value ) {
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << "\"";
|
oss << "\"";
|
||||||
@ -81,6 +82,7 @@ inline std::string toString( const std::wstring& value ) {
|
|||||||
oss << "\"";
|
oss << "\"";
|
||||||
return oss.str();
|
return oss.str();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
inline std::string toString( const char* const value ) {
|
inline std::string toString( const char* const value ) {
|
||||||
return value ? Catch::toString( std::string( value ) ) : std::string( "{null string}" );
|
return value ? Catch::toString( std::string( value ) ) : std::string( "{null string}" );
|
||||||
|
Loading…
Reference in New Issue
Block a user