summaryrefslogtreecommitdiff
path: root/libadhocutil/unittests/testLocks.cpp
blob: bdf0d1879d9aa7d7c9c9990632fea8848862bd69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#define BOOST_TEST_MODULE Locks
#include <boost/test/unit_test.hpp>

#include "lockHelpers.h"
#include <boost/thread/shared_mutex.hpp>

BOOST_AUTO_TEST_CASE ( lock )
{
	boost::shared_mutex _lock;
	Lock(_lock);
}

BOOST_AUTO_TEST_CASE ( sharedlock )
{
	boost::shared_mutex _lock;
	SharedLock(_lock);
}

BOOST_AUTO_TEST_CASE ( scopelock )
{
	boost::shared_mutex _lock;
	ScopeLock(_lock) { }
}

BOOST_AUTO_TEST_CASE ( sharedscopelock )
{
	boost::shared_mutex _lock;
	SharedScopeLock(_lock) { }
}