Use wxLocale instead of setlocale() to change the locale in the tests.
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
This commit is contained in:
@@ -136,7 +136,7 @@ void NumValidatorTestCase::TransferUnsigned()
|
|||||||
void NumValidatorTestCase::TransferFloat()
|
void NumValidatorTestCase::TransferFloat()
|
||||||
{
|
{
|
||||||
// We need a locale with point as decimal separator.
|
// We need a locale with point as decimal separator.
|
||||||
CLocaleSetter cloc;
|
wxLocale loc(wxLANGUAGE_ENGLISH_UK, wxLOCALE_DONT_LOAD_DEFAULT);
|
||||||
|
|
||||||
float value = 0;
|
float value = 0;
|
||||||
wxFloatingPointValidator<float> valFloat(3, &value);
|
wxFloatingPointValidator<float> valFloat(3, &value);
|
||||||
@@ -184,7 +184,7 @@ void NumValidatorTestCase::ZeroAsBlank()
|
|||||||
void NumValidatorTestCase::NoTrailingZeroes()
|
void NumValidatorTestCase::NoTrailingZeroes()
|
||||||
{
|
{
|
||||||
// We need a locale with point as decimal separator.
|
// We need a locale with point as decimal separator.
|
||||||
CLocaleSetter cloc;
|
wxLocale loc(wxLANGUAGE_ENGLISH_UK, wxLOCALE_DONT_LOAD_DEFAULT);
|
||||||
|
|
||||||
double value = 1.2;
|
double value = 1.2;
|
||||||
m_text->SetValidator(
|
m_text->SetValidator(
|
||||||
|
Reference in New Issue
Block a user