#pragma hdrstop
#endif
+// this test needs threads as it runs the test server in a secondary thread
+#if wxUSE_THREADS
+
// for all others, include the necessary headers
#ifndef WX_PRECOMP
+ #include "wx/app.h"
#endif
-// this test needs threads as it runs the test server in a secondary thread
-#if wxUSE_THREADS
-
#include "wx/ipc.h"
#include "wx/thread.h"
+#define wxUSE_SOCKETS_FOR_IPC (!wxUSE_DDE_FOR_IPC)
+
namespace
{
{
m_conn = NULL;
+#if wxUSE_SOCKETS_FOR_IPC
// we must call this from the main thread
wxSocketBase::Initialize();
+#endif // wxUSE_SOCKETS_FOR_IPC
// we need event dispatching to work for IPC server to work
m_thread = new EventThread;
m_thread->Wait();
delete m_thread;
- m_thread = NULL;
+ delete m_conn;
+
+#if wxUSE_SOCKETS_FOR_IPC
wxSocketBase::Shutdown();
+#endif // wxUSE_SOCKETS_FOR_IPC
}
virtual wxConnectionBase *OnAcceptConnection(const wxString& topic)
DECLARE_NO_COPY_CLASS(IPCTestCase)
};
-// this test is not enabled by default because it requires an IPC server to run
-//CPPUNIT_TEST_SUITE_REGISTRATION( IPCTestCase );
+CPPUNIT_TEST_SUITE_REGISTRATION( IPCTestCase );
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( IPCTestCase, "IPCTestCase" );
void IPCTestCase::Connect()