]> git.saurik.com Git - wxWidgets.git/commitdiff
Explicitly set "C" locale for the tests using decimal point.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 20 Jan 2011 15:06:17 +0000 (15:06 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 20 Jan 2011 15:06:17 +0000 (15:06 +0000)
Ensure that the tests expecting the results with a point as decimal separator
really are done in C locale.

This should help the tests pass in (French) locale used by the MSW build bot
slaves.

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

tests/validators/valnum.cpp

index 271162965e92ac0305fc825ef2a5f8278817ff52..3b2369c5187e2cfd615da57f7eedd6196baa2c79 100644 (file)
@@ -135,6 +135,9 @@ void NumValidatorTestCase::TransferUnsigned()
 
 void NumValidatorTestCase::TransferFloat()
 {
+    // We need a locale with point as decimal separator.
+    CLocaleSetter cloc;
+
     float value = 0;
     wxFloatingPointValidator<float> 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.
+    CLocaleSetter cloc;
+
     double value = 1.2;
     m_text->SetValidator(
         wxMakeFloatingPointValidator(3, &value, wxNUM_VAL_NO_TRAILING_ZEROES));