Check for wxXLocale availability without using wxLocale

This extends the changes done 01cd702ee3
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
This commit is contained in:
Vadim Zeitlin 2017-12-09 14:17:34 +01:00
parent ddf3604545
commit 22e14e7c7b

View File

@ -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()