X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a54cf37118275c43cf03beb9a8960bba0d8a957c..e86aa7a62cc8be79ffaeb0d07b70161cb9ea2c74:/tests/validators/valnum.cpp diff --git a/tests/validators/valnum.cpp b/tests/validators/valnum.cpp index 271162965e..599192e835 100644 --- a/tests/validators/valnum.cpp +++ b/tests/validators/valnum.cpp @@ -61,7 +61,7 @@ private: // register in the unnamed registry so that these tests are run by default CPPUNIT_TEST_SUITE_REGISTRATION( NumValidatorTestCase ); -// also include in it's own registry so that these tests can be run alone +// also include in its own registry so that these tests can be run alone CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( NumValidatorTestCase, "NumValidatorTestCase" ); void NumValidatorTestCase::setUp() @@ -135,6 +135,9 @@ void NumValidatorTestCase::TransferUnsigned() void NumValidatorTestCase::TransferFloat() { + // We need a locale with point as decimal separator. + wxLocale loc(wxLANGUAGE_ENGLISH_UK, wxLOCALE_DONT_LOAD_DEFAULT); + float value = 0; wxFloatingPointValidator valFloat(3, &value); valFloat.SetWindow(m_text); @@ -180,6 +183,9 @@ void NumValidatorTestCase::ZeroAsBlank() void NumValidatorTestCase::NoTrailingZeroes() { + // We need a locale with point as decimal separator. + wxLocale loc(wxLANGUAGE_ENGLISH_UK, wxLOCALE_DONT_LOAD_DEFAULT); + double value = 1.2; m_text->SetValidator( wxMakeFloatingPointValidator(3, &value, wxNUM_VAL_NO_TRAILING_ZEROES)); @@ -198,6 +204,14 @@ void NumValidatorTestCase::NoTrailingZeroes() void NumValidatorTestCase::Interactive() { +#ifdef __WXMSW__ + // FIXME: This test fails on MSW buildbot slaves although works fine on + // development machine, no idea why. It seems to be a problem with + // wxUIActionSimulator rather the wxListCtrl control itself however. + if ( IsAutomaticTest() ) + return; +#endif // __WXMSW__ + // Set a locale using comma as thousands separator character. wxLocale loc(wxLANGUAGE_ENGLISH_UK, wxLOCALE_DONT_LOAD_DEFAULT);