mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
const_casts to get rid of warnings in new wchar_t tests
This commit is contained in:
parent
7bc0b44597
commit
4aaf67ff31
@ -370,13 +370,13 @@ TEST_CASE( "toString on const wchar_t pointer returns the string contents", "[to
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE( "toString on wchar_t const pointer returns the string contents", "[toString]" ) {
|
TEST_CASE( "toString on wchar_t const pointer returns the string contents", "[toString]" ) {
|
||||||
wchar_t * const s = L"wide load";
|
wchar_t * const s = const_cast<wchar_t* const>( L"wide load" );
|
||||||
std::string result = Catch::toString( s );
|
std::string result = Catch::toString( s );
|
||||||
CHECK( result == "\"wide load\"" );
|
CHECK( result == "\"wide load\"" );
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE( "toString on wchar_t returns the string contents", "[toString]" ) {
|
TEST_CASE( "toString on wchar_t returns the string contents", "[toString]" ) {
|
||||||
wchar_t * s = L"wide load";
|
wchar_t * s = const_cast<wchar_t*>( L"wide load" );
|
||||||
std::string result = Catch::toString( s );
|
std::string result = Catch::toString( s );
|
||||||
CHECK( result == "\"wide load\"" );
|
CHECK( result == "\"wide load\"" );
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user