mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-03-24 11:24:08 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user