]> git.saurik.com Git - wxWidgets.git/commitdiff
Use wxLocale instead of setlocale() to change the locale in the tests.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 8 Feb 2011 17:24:45 +0000 (17:24 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 8 Feb 2011 17:24:45 +0000 (17:24 +0000)
Numeric validator tests rely on wxLocale::GetInfo() returning the decimal
point and calling setlocale() is not enough to ensure this under MSW, we must
use wxLocale for this currently.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/validators/valnum.cpp

index 3b2369c5187e2cfd615da57f7eedd6196baa2c79..531dd0e66ada6d6713945db2dbd071c517bf2f25 100644 (file)
@@ -136,7 +136,7 @@ void NumValidatorTestCase::TransferUnsigned()
 void NumValidatorTestCase::TransferFloat()
 {
     // We need a locale with point as decimal separator.
-    CLocaleSetter cloc;
+    wxLocale loc(wxLANGUAGE_ENGLISH_UK, wxLOCALE_DONT_LOAD_DEFAULT);
 
     float value = 0;
     wxFloatingPointValidator<float> valFloat(3, &value);
@@ -184,7 +184,7 @@ void NumValidatorTestCase::ZeroAsBlank()
 void NumValidatorTestCase::NoTrailingZeroes()
 {
     // We need a locale with point as decimal separator.
-    CLocaleSetter cloc;
+    wxLocale loc(wxLANGUAGE_ENGLISH_UK, wxLOCALE_DONT_LOAD_DEFAULT);
 
     double value = 1.2;
     m_text->SetValidator(