Add wxUILocale::IsSupported()

This function can now be implemented relatively straightforwardly
(although it does require an extra check under Mac), so add it, as it
can be generally useful and we're also going to need it for our own
tests in the upcoming commit.
This commit is contained in:
Vadim Zeitlin
2021-08-30 21:02:00 +02:00
parent aa4cce8f7d
commit 32316af106
5 changed files with 38 additions and 2 deletions

View File

@@ -240,6 +240,13 @@ TEST_CASE("wxLocale::Default", "[locale]")
#endif // wxUSE_UNICODE
TEST_CASE("wxUILocale::IsSupported", "[uilocale]")
{
CHECK( wxUILocale("en").IsSupported() );
CHECK( wxUILocale(wxLocaleIdent("fr").Region("FR")).IsSupported() );
CHECK( !wxUILocale("bloordyblop").IsSupported() );
}
TEST_CASE("wxUILocale::GetInfo", "[uilocale]")
{
CHECK( wxUILocale("en").GetInfo(wxLOCALE_DECIMAL_POINT) == "." );