From 22e14e7c7b1fddb5b97212e59203c0acf7779ba0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 9 Dec 2017 14:17:34 +0100 Subject: [PATCH] Check for wxXLocale availability without using wxLocale This extends the changes done 01cd702ee381065f1df19385b17150b60317b5f9 to another test case and so makes as much sense as the other commit. It's still not clear what's really going on here as, somehow, this test passed under AppVeyor before, which shouldn't have been happening if the explanation in that commit message was correct. And it also doesn't explain why did it suddenly fail after a completely unrelated change, see https://ci.appveyor.com/project/wxWidgets/wxwidgets/build/2502/job/l24gc2j0j7h7huxl --- tests/xlocale/xlocale.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/xlocale/xlocale.cpp b/tests/xlocale/xlocale.cpp index 2c00722869..55eb58b853 100644 --- a/tests/xlocale/xlocale.cpp +++ b/tests/xlocale/xlocale.cpp @@ -69,17 +69,16 @@ void XLocaleTestCase::TestCtor() CPPUNIT_ASSERT( wxXLocale("C").IsOk() ); CPPUNIT_ASSERT( !wxXLocale("bloordyblop").IsOk() ); - if (!wxLocale::IsAvailable(wxLANGUAGE_FRENCH)) - return; // you should have french support installed to continue this test! - #ifdef wxHAS_XLOCALE_SUPPORT - CPPUNIT_ASSERT( wxXLocale(wxLANGUAGE_FRENCH).IsOk() ); + if ( wxXLocale(wxLANGUAGE_FRENCH).IsOk() ) + { #ifdef __WINDOWS__ - CPPUNIT_ASSERT( wxXLocale("french").IsOk() ); + CPPUNIT_ASSERT( wxXLocale("french").IsOk() ); #else - CPPUNIT_ASSERT( wxXLocale("fr_FR").IsOk() ); -#endif + CPPUNIT_ASSERT( wxXLocale("fr_FR").IsOk() ); #endif + } +#endif // wxHAS_XLOCALE_SUPPORT } void XLocaleTestCase::PreserveLocale()