]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/test.cpp
don't readd items in SetImageList() after changing the control mode, they are suppose...
[wxWidgets.git] / tests / test.cpp
index 667c2c0c3055e21bb510e0e323a0d772b14b2912..2f7f71903cd0fa024d8d14824ce7d9c35e853932 100644 (file)
     #include "wx/msw/msvcrt.h"
 #endif
 
+#ifdef __WXOSX__
+    #include "wx/osx/private.h"
+#endif
+
 using namespace std;
 
 using CppUnit::Test;
@@ -436,6 +440,13 @@ static Test *GetTestByName(const wxString& name)
 //
 int TestApp::OnRun()
 {
+#if wxUSE_GUI
+#ifdef __WXOSX__
+    // make sure there's always an autorelease pool ready
+    wxMacAutoreleasePool autoreleasepool;
+#endif
+#endif
+
 #if wxUSE_LOG
     // Switch off logging unless --verbose
     bool verbose = wxLog::GetVerbose();