diff --git a/src/libraries/turtle/expectation.hpp b/src/libraries/turtle/expectation.hpp index c3937a5..14fceca 100644 --- a/src/libraries/turtle/expectation.hpp +++ b/src/libraries/turtle/expectation.hpp @@ -46,11 +46,11 @@ namespace mock matcher_type; public: - expectation( node& parent = root, const std::string& name = "?" ) + expectation( node& parent = detail::root, const std::string& name = "?" ) : impl_( new expectation_impl( parent, name ) ) {} expectation( const std::string& name ) - : impl_( new expectation_impl( root, name ) ) + : impl_( new expectation_impl( detail::root, name ) ) {} expectation& set_name( const std::string& name ) diff --git a/src/libraries/turtle/object.hpp b/src/libraries/turtle/object.hpp index e180c41..c5c07b8 100644 --- a/src/libraries/turtle/object.hpp +++ b/src/libraries/turtle/object.hpp @@ -19,12 +19,12 @@ namespace mock class object : public node { public: - explicit object( node& parent = root, const std::string& name = "" ) + explicit object( node& parent = detail::root, const std::string& name = "" ) : node( parent ) , name_( name ) {} explicit object( const std::string& name ) - : node( root ) + : node( detail::root ) , name_( name ) {} diff --git a/src/libraries/turtle/root.hpp b/src/libraries/turtle/root.hpp index addb59b..075fc9c 100644 --- a/src/libraries/turtle/root.hpp +++ b/src/libraries/turtle/root.hpp @@ -13,6 +13,8 @@ #include namespace mock +{ +namespace detail { class root_t : public boost::unit_test::singleton< root_t >, public node { @@ -22,14 +24,15 @@ namespace mock BOOST_TEST_SINGLETON_CONS( root_t ); }; BOOST_TEST_SINGLETON_INST( root ) +} inline bool verify() { - return root.verify(); + return detail::root.verify(); } inline void reset() { - root.reset(); + detail::root.reset(); } }