From 72518b62974e3152bf05565132195e881406e46e Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Fri, 16 Nov 2018 08:35:53 +0100 Subject: [PATCH] Fix names --- include/turtle/detail/functor.hpp | 6 +++--- include/turtle/detail/mutex.hpp | 4 ++-- include/turtle/detail/root.hpp | 4 ++-- include/turtle/detail/singleton.hpp | 2 +- test/detail/test_function.cpp | 4 ++-- test/mock_error.hpp | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/turtle/detail/functor.hpp b/include/turtle/detail/functor.hpp index 54dd9df..62c4de2 100644 --- a/include/turtle/detail/functor.hpp +++ b/include/turtle/detail/functor.hpp @@ -18,11 +18,11 @@ namespace mock { namespace detail { - class functor_mutex_t : - public singleton< functor_mutex_t >, + class functor_mutex : + public singleton< functor_mutex >, public mutex { - MOCK_SINGLETON_CONS( functor_mutex_t ); + MOCK_SINGLETON_CONS( functor_mutex ); }; template< typename Signature > diff --git a/include/turtle/detail/mutex.hpp b/include/turtle/detail/mutex.hpp index 12691c3..75de765 100644 --- a/include/turtle/detail/mutex.hpp +++ b/include/turtle/detail/mutex.hpp @@ -93,10 +93,10 @@ namespace mock { namespace detail { - class error_mutex_t : public singleton< error_mutex_t >, + class error_mutex : public singleton< error_mutex >, public mutex { - MOCK_SINGLETON_CONS( error_mutex_t ); + MOCK_SINGLETON_CONS( error_mutex ); }; #ifdef BOOST_MSVC diff --git a/include/turtle/detail/root.hpp b/include/turtle/detail/root.hpp index 1eed2aa..1cdf9fb 100644 --- a/include/turtle/detail/root.hpp +++ b/include/turtle/detail/root.hpp @@ -24,7 +24,7 @@ namespace mock { namespace detail { - class root_t : public singleton< root_t >, public context + class root : public singleton< root >, public context { public: virtual void add( const void* p, verifiable& v, @@ -128,7 +128,7 @@ namespace detail group group_; mutable mutex mutex_; - MOCK_SINGLETON_CONS( root_t ); + MOCK_SINGLETON_CONS( root ); }; } } // mock diff --git a/include/turtle/detail/singleton.hpp b/include/turtle/detail/singleton.hpp index 7e63bb7..fa2e5c0 100644 --- a/include/turtle/detail/singleton.hpp +++ b/include/turtle/detail/singleton.hpp @@ -36,4 +36,4 @@ type() {} } // detail } // mock -#endif // MOCK_SINGLETON_HPP \ No newline at end of file +#endif // MOCK_SINGLETON_HPP diff --git a/test/detail/test_function.cpp b/test/detail/test_function.cpp index 682840a..4996251 100644 --- a/test/detail/test_function.cpp +++ b/test/detail/test_function.cpp @@ -907,8 +907,8 @@ BOOST_FIXTURE_TEST_CASE( adding_file_and_line_number_information, mock_error_fix mock::detail::function< void() > f; f.expect( "file name", 42 ).once(); CHECK_ERROR( f.verify(), "verification failed", 0, "?\n. once()" ); - BOOST_CHECK_EQUAL( "file name", mock_error_data.last_file ); - BOOST_CHECK_EQUAL( 42, mock_error_data.last_line ); + BOOST_CHECK_EQUAL( "file name", mock_error_data::inst().last_file ); + BOOST_CHECK_EQUAL( 42, mock_error_data::inst().last_line ); } #ifdef MOCK_THREAD_SAFE diff --git a/test/mock_error.hpp b/test/mock_error.hpp index f1990bd..1e27dac 100644 --- a/test/mock_error.hpp +++ b/test/mock_error.hpp @@ -15,7 +15,7 @@ #include #include -struct mock_error_data_t : turtle::detail::singleton< mock_error_data_t > +struct mock_error_data : mock::detail::singleton< mock_error_data > { void reset() { @@ -53,7 +53,7 @@ struct mock_error_data_t : turtle::detail::singleton< mock_error_data_t > std::string last_file; int last_line; - MOCK_SINGLETON_CONS( mock_error_data_t ); + MOCK_SINGLETON_CONS( mock_error_data ); }; template< typename Result >