Define wxNO_UNSAFE_WXSTRING_CONV if wxUSE_UNSAFE_WXSTRING_CONV==0
This doesn't really change anything, but allows to simplify the tests, as we can now check only for wxNO_UNSAFE_WXSTRING_CONV and this covers both the case of the library compiled without support for the unsafe conversions at all and the case when the conversions are disabled by explicitly defining wxNO_UNSAFE_WXSTRING_CONV when building the application.
This commit is contained in:
parent
5119d35d3b
commit
4913857ef7
3 changed files with 14 additions and 8 deletions
|
|
@ -614,7 +614,7 @@ TEST_CASE("StdString::Conversion", "[stdstring]")
|
|||
|
||||
wxString s4("hello");
|
||||
|
||||
#if wxUSE_STD_STRING_CONV_IN_WXSTRING && wxUSE_UNSAFE_WXSTRING_CONV
|
||||
#if wxUSE_STD_STRING_CONV_IN_WXSTRING && !defined(wxNO_UNSAFE_WXSTRING_CONV)
|
||||
std::string s5 = s4;
|
||||
#else
|
||||
std::string s5 = s4.ToStdString();
|
||||
|
|
@ -629,7 +629,7 @@ TEST_CASE("StdString::Conversion", "[stdstring]")
|
|||
CHECK( s6 == L"hello" );
|
||||
|
||||
#if wxUSE_STD_STRING_CONV_IN_WXSTRING
|
||||
#if wxUSE_UNSAFE_WXSTRING_CONV
|
||||
#if !defined(wxNO_UNSAFE_WXSTRING_CONV)
|
||||
std::string s7(s4);
|
||||
CHECK( s7 == "hello" );
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1020,7 +1020,7 @@ TEST_CASE("StringCStrDataImplicitConversion", "[wxString]")
|
|||
|
||||
#if wxUSE_CHAR_CONV_IN_WXSTRING
|
||||
CHECK( CheckStrConstWChar(s, s) );
|
||||
#if wxUSE_UNSAFE_WXSTRING_CONV
|
||||
#ifndef wxNO_UNSAFE_WXSTRING_CONV
|
||||
CHECK( CheckStrConstChar(s, s) );
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue