mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-05 16:26:27 +01:00
5cff648eea
This includes appropriate tests, which pass on my Mac 10.4 machine
55 lines
1.0 KiB
C++
55 lines
1.0 KiB
C++
//
|
|
// NotificationQueueTest.h
|
|
//
|
|
// $Id: //poco/1.4/Foundation/testsuite/src/NotificationQueueTest.h#1 $
|
|
//
|
|
// Definition of the NotificationQueueTest class.
|
|
//
|
|
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
|
// and Contributors.
|
|
//
|
|
// SPDX-License-Identifier: BSL-1.0
|
|
//
|
|
|
|
|
|
#ifndef NotificationQueueTest_INCLUDED
|
|
#define NotificationQueueTest_INCLUDED
|
|
|
|
|
|
#include "Poco/Foundation.h"
|
|
#include "CppUnit/TestCase.h"
|
|
#include "Poco/NotificationQueue.h"
|
|
#include "Poco/Mutex.h"
|
|
#include <set>
|
|
|
|
|
|
class NotificationQueueTest: public CppUnit::TestCase
|
|
{
|
|
public:
|
|
NotificationQueueTest(const std::string& name);
|
|
~NotificationQueueTest();
|
|
|
|
void testQueueDequeue();
|
|
void testQueueDequeueUrgent();
|
|
void testWaitDequeue();
|
|
void testThreads();
|
|
void testDefaultQueue();
|
|
void testQueueRemove();
|
|
|
|
void setUp();
|
|
void tearDown();
|
|
|
|
static CppUnit::Test* suite();
|
|
|
|
protected:
|
|
void work();
|
|
|
|
private:
|
|
Poco::NotificationQueue _queue;
|
|
std::multiset<std::string> _handled;
|
|
Poco::FastMutex _mutex;
|
|
};
|
|
|
|
|
|
#endif // NotificationQueueTest_INCLUDED
|