diff --git a/turtle/detail/check.hpp b/turtle/detail/check.hpp index e360a90..fcdd5ee 100644 --- a/turtle/detail/check.hpp +++ b/turtle/detail/check.hpp @@ -81,7 +81,7 @@ namespace detail template< typename Actual, typename Functor > class check< Actual, Functor, BOOST_DEDUCED_TYPENAME boost::enable_if< - detail::is_functor< Functor > + is_functor< Functor > >::type > : public check_base< Actual > { diff --git a/turtle/detail/expectation_base.hpp b/turtle/detail/expectation_base.hpp index bfb5baf..db1199c 100644 --- a/turtle/detail/expectation_base.hpp +++ b/turtle/detail/expectation_base.hpp @@ -22,7 +22,7 @@ namespace detail { public: expectation_base() - : i_( new detail::unlimited() ) + : i_( new unlimited() ) , file_( "unknown location" ) , line_( 0 ) {} @@ -72,22 +72,22 @@ namespace detail (*it)->remove( this ); } - void expect( detail::invocation* i ) + void expect( invocation* i ) { i_.reset( i ); } - void add( boost::shared_ptr< detail::sequence_impl > s ) + void add( boost::shared_ptr< sequence_impl > s ) { s->add( this ); sequences_.push_back( s ); } - boost::shared_ptr< detail::invocation > i_; + boost::shared_ptr< invocation > i_; private: typedef std::vector< - boost::shared_ptr< detail::sequence_impl > + boost::shared_ptr< sequence_impl > > sequences_type; typedef sequences_type::const_iterator sequences_cit; diff --git a/turtle/detail/expectation_template.hpp b/turtle/detail/expectation_template.hpp index 5abbb90..2d1b867 100644 --- a/turtle/detail/expectation_template.hpp +++ b/turtle/detail/expectation_template.hpp @@ -11,20 +11,13 @@ #define MOCK_EXPECTATION_INITIALIZE(z, n, d) \ BOOST_PP_COMMA_IF(n) c##n##_( \ - new detail::check< \ - arg##n##_type, \ - constraint< detail::any > \ - >( mock::any ) ) + new check< arg##n##_type, constraint< any > >( mock::any ) ) #define MOCK_EXPECTATION_WITH(z, n, d) \ - c##n##_.reset( \ - new detail::check< \ - arg##n##_type, \ - Constraint_##n \ - >( c##n ) ); + c##n##_.reset( new check< arg##n##_type, Constraint_##n >( c##n ) ); #define MOCK_EXPECTATION_MEMBER(z, n, d) \ - boost::shared_ptr< detail::check_base< arg##n##_type > > c##n##_; + boost::shared_ptr< check_base< arg##n##_type > > c##n##_; #define MOCK_EXPECTATION_ARGS(z, n, d) \ BOOST_PP_COMMA_IF(n) arg##n##_type a##n diff --git a/turtle/detail/function_impl_template.hpp b/turtle/detail/function_impl_template.hpp index c94e4b0..35b3b27 100644 --- a/turtle/detail/function_impl_template.hpp +++ b/turtle/detail/function_impl_template.hpp @@ -29,15 +29,13 @@ namespace detail template< typename R BOOST_PP_COMMA_IF(MOCK_NUM_ARGS) BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, typename T) > class function_impl< R ( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, T) ) > - : public detail::verifiable, - public boost::enable_shared_from_this< + : public verifiable, public boost::enable_shared_from_this< function_impl< R ( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, T) )> > { public: typedef MOCK_ERROR_POLICY< R > error_type; - typedef detail::expectation< - R ( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, T) ) + typedef expectation< R ( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, T) ) > expectation_type; public: @@ -174,7 +172,7 @@ namespace detail expectations_type::const_iterator expectations_cit; expectations_type expectations_; - detail::context* context_; + context* context_; mutable bool valid_; }; } diff --git a/turtle/detail/function_template.hpp b/turtle/detail/function_template.hpp index 88b5ca4..41af8a9 100644 --- a/turtle/detail/function_template.hpp +++ b/turtle/detail/function_template.hpp @@ -78,20 +78,20 @@ namespace detail return s << *e.impl_; } - function& operator()( detail::context& c, + function& operator()( context& c, boost::unit_test::const_string instance ) { if( ! impl_->context_ ) c.add( *impl_ ); c.add( impl_.get(), *impl_, instance, - boost::optional< detail::type_name >(), "" ); + boost::optional< type_name >(), "" ); impl_->context_ = &c; return *this; } - void configure( detail::context& c, const void* p, + void configure( context& c, const void* p, boost::unit_test::const_string instance, - boost::optional< detail::type_name > type, + boost::optional< type_name > type, boost::unit_test::const_string name ) const { if( ! impl_->context_ ) diff --git a/turtle/detail/object_impl.hpp b/turtle/detail/object_impl.hpp index b28ee65..8ccec1e 100644 --- a/turtle/detail/object_impl.hpp +++ b/turtle/detail/object_impl.hpp @@ -23,24 +23,24 @@ namespace mock { namespace detail { - class object_impl : public detail::context, public detail::verifiable, + class object_impl : public context, public verifiable, public boost::enable_shared_from_this< object_impl > { public: - virtual void add( const void* /*p*/, detail::verifiable& v, + virtual void add( const void* /*p*/, verifiable& v, boost::unit_test::const_string instance, - boost::optional< detail::type_name > type, + boost::optional< type_name > type, boost::unit_test::const_string name ) { if( children_.empty() ) mock::detail::root.add( *this ); children_[ &v ].update( parent_, instance, type, name ); } - virtual void add( detail::verifiable& v ) + virtual void add( verifiable& v ) { group_.add( v ); } - virtual void remove( detail::verifiable& v ) + virtual void remove( verifiable& v ) { group_.remove( v ); children_.erase( &v ); @@ -48,8 +48,7 @@ namespace detail mock::detail::root.remove( *this ); } - virtual void serialize( std::ostream& s, - const detail::verifiable& v ) const + virtual void serialize( std::ostream& s, const verifiable& v ) const { children_cit it = children_.find( &v ); if( it != children_.end() ) @@ -69,14 +68,11 @@ namespace detail } private: - typedef std::map< - const detail::verifiable*, - detail::child - > children_t; + typedef std::map< const verifiable*, child > children_t; typedef children_t::const_iterator children_cit; - detail::group group_; - detail::parent parent_; + group group_; + parent parent_; children_t children_; }; } diff --git a/turtle/detail/root.hpp b/turtle/detail/root.hpp index 8173a01..734d768 100644 --- a/turtle/detail/root.hpp +++ b/turtle/detail/root.hpp @@ -21,8 +21,7 @@ namespace mock { namespace detail { - class root_t : public boost::unit_test::singleton< root_t >, - public detail::context + class root_t : public boost::unit_test::singleton< root_t >, public context { public: virtual void add( const void* p, verifiable& v, diff --git a/turtle/object.hpp b/turtle/object.hpp index bd01b34..05da5d0 100644 --- a/turtle/object.hpp +++ b/turtle/object.hpp @@ -38,7 +38,7 @@ namespace detail template< typename E > E& configure( const object& o, E& e, boost::unit_test::const_string instance, - boost::optional< detail::type_name > type, + boost::optional< type_name > type, boost::unit_test::const_string name ) { e.configure( *o.impl_, o.impl_.get(), instance, type, name ); @@ -48,7 +48,7 @@ namespace detail template< typename T, typename E > E& configure( const T& t, E& e, boost::unit_test::const_string instance, - boost::optional< detail::type_name > type, + boost::optional< type_name > type, boost::unit_test::const_string name, BOOST_DEDUCED_TYPENAME boost::disable_if< BOOST_DEDUCED_TYPENAME boost::is_base_of< object, T >