mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Implement and use simple singleton
Based on old boost::unit_test::singleton
This commit is contained in:
parent
d77aad128c
commit
72e0daae5c
5 changed files with 62 additions and 19 deletions
|
|
@ -10,7 +10,7 @@
|
|||
#define MOCK_MUTEX_HPP_INCLUDED
|
||||
|
||||
#include "../config.hpp"
|
||||
#include <boost/test/utils/trivial_singleton.hpp>
|
||||
#include "singleton.hpp"
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#ifdef MOCK_THREAD_SAFE
|
||||
|
|
@ -93,13 +93,12 @@ namespace mock
|
|||
{
|
||||
namespace detail
|
||||
{
|
||||
class error_mutex_t : public boost::unit_test::singleton< error_mutex_t >,
|
||||
class error_mutex_t : public singleton< error_mutex_t >,
|
||||
public mutex
|
||||
{
|
||||
private:
|
||||
BOOST_TEST_SINGLETON_CONS( error_mutex_t );
|
||||
MOCK_SINGLETON_CONS( error_mutex_t );
|
||||
};
|
||||
BOOST_TEST_SINGLETON_INST( error_mutex )
|
||||
MOCK_SINGLETON_INST( error_mutex )
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning( push )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue