]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/datetime/datetimetest.cpp
Fix warnings in the MSW IE backend.
[wxWidgets.git] / tests / datetime / datetimetest.cpp
index d60aae81b6dc5e9e0550c2499d99c0a9857ac334..8d1d4aa38b9bf0f3b5b32adace3b6b0a08d2a90f 100644 (file)
@@ -83,18 +83,6 @@ private:
 
 #endif // CHANGE_SYSTEM_DATE
 
-// helper class setting the locale to "C" for its lifetime
-class CLocaleSetter
-{
-public:
-    CLocaleSetter() : m_locOld(setlocale(LC_ALL, "C")) { }
-    ~CLocaleSetter() { setlocale(LC_ALL, m_locOld); }
-
-private:
-    const char * const m_locOld;
-    wxDECLARE_NO_COPY_CLASS(CLocaleSetter);
-};
-
 // helper function translating week day/month names from English to the current
 // locale
 static wxString TranslateDate(const wxString& str)
@@ -276,7 +264,7 @@ private:
 // register in the unnamed registry so that these tests are run by default
 CPPUNIT_TEST_SUITE_REGISTRATION( DateTimeTestCase );
 
-// 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( DateTimeTestCase, "DateTimeTestCase" );
 
 // ============================================================================
@@ -733,7 +721,7 @@ void DateTimeTestCase::TestTimeFormat()
             {
                 // conversion failed - should it have?
                 WX_ASSERT_MESSAGE(
-                    ("Test #%lu failed: failed to parse \"%s\"", n, s),
+                    ("Test #%u failed: failed to parse \"%s\"", n, s),
                     kind == CompareNone
                 );
             }
@@ -747,7 +735,7 @@ void DateTimeTestCase::TestTimeFormat()
                     result++;
 
                 WX_ASSERT_MESSAGE(
-                    ("Test #%lu failed: \"%s\" was left unparsed in \"%s\"",
+                    ("Test #%u failed: \"%s\" was left unparsed in \"%s\"",
                      n, result, s),
                     !*result
                 );
@@ -985,6 +973,7 @@ void DateTimeTestCase::TestDateParse()
         { "29 Feb 2006" },
         { "31/04/06" },
         { "bloordyblop" },
+        { "2 .  .    " },
     };
 
     // special cases