]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/strings/numformatter.cpp
Resolve ambiguity between GetClientXXX() methods in wxOSX wxComboBox.
[wxWidgets.git] / tests / strings / numformatter.cpp
index 7ab235bc8188761cd79348689e374f21376a84d9..ab67abf9aba01ccb43dd5fb3586f8713509cd091 100644 (file)
 class NumFormatterTestCase : public CppUnit::TestCase
 {
 public:
-    NumFormatterTestCase()
+    NumFormatterTestCase() { m_locale = NULL; }
+
+    virtual void setUp()
     {
         // We need to use a locale with known decimal point and which uses the
         // thousands separator for the tests to make sense.
         m_locale = new wxLocale(wxLANGUAGE_ENGLISH_UK,
                                 wxLOCALE_DONT_LOAD_DEFAULT);
         if ( !m_locale->IsOk() )
-        {
-            delete m_locale;
-            m_locale = NULL;
-        }
+            tearDown();
     }
 
-    virtual ~NumFormatterTestCase()
+    virtual void tearDown()
     {
         delete m_locale;
+        m_locale = NULL;
     }
 
 private:
@@ -80,7 +80,7 @@ private:
 // register in the unnamed registry so that these tests are run by default
 CPPUNIT_TEST_SUITE_REGISTRATION( NumFormatterTestCase );
 
-// 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( NumFormatterTestCase, "NumFormatterTestCase" );
 
 // ----------------------------------------------------------------------------