X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6aaee6afdcde7c9e677f642303d4988a66cb9dc9..f0e5d5d22ce012e9312a63175d79c0f4a8d444be:/tests/thread/queue.cpp diff --git a/tests/thread/queue.cpp b/tests/thread/queue.cpp index a439e8ccde..87a00898a4 100644 --- a/tests/thread/queue.cpp +++ b/tests/thread/queue.cpp @@ -3,7 +3,7 @@ // Purpose: Unit test for wxMessageQueue // Author: Evgeniy Tarassov // Created: 31/10/2007 -// RCS-ID: $Id:$ +// RCS-ID: $Id$ // Copyright: (c) 2007 Evgeniy Tarassov // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -34,15 +34,15 @@ class QueueTestCase : public CppUnit::TestCase public: QueueTestCase() { } -private: - typedef wxMessageQueue Queue; - enum WaitTestType { WaitWithTimeout = 0, WaitInfinitlyLong }; +private: + typedef wxMessageQueue Queue; + // This class represents a thread that waits (following WaitTestType type) // for exactly maxMsgCount messages from its message queue and if another // MyThread is specified, then every message received is posted @@ -87,7 +87,7 @@ private: // register in the unnamed registry so that these tests are run by default CPPUNIT_TEST_SUITE_REGISTRATION( QueueTestCase ); -// 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( QueueTestCase, "QueueTestCase" ); // this function creates the given number of threads and posts msgCount @@ -174,7 +174,7 @@ void *QueueTestCase::MyThread::Entry() while ( messagesReceived < m_maxMsgCount ) { wxMessageQueueError result; - int msg; + int msg = -1; // just to suppress "possibly uninitialized" warnings if ( m_type == WaitWithTimeout ) result = m_queue.ReceiveTimeout(1000, msg);