mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Cleanup
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@437 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
c1b3b1d4dd
commit
783d24a89f
69 changed files with 482 additions and 351 deletions
|
|
@ -1,2 +1,2 @@
|
|||
extensions = svn,headers
|
||||
extensions = svn,headers,check
|
||||
platform = vc80
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@
|
|||
|
||||
<target name="reports" description="generate code analysis reports">
|
||||
<headers name="turtle"/>
|
||||
<check name="turtle"/>
|
||||
</target>
|
||||
|
||||
<target name="export" description="export distribution">
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_ACTION_HPP_INCLUDED
|
||||
#define MOCK_ACTION_HPP_INCLUDED
|
||||
|
|
@ -162,7 +163,9 @@ namespace detail
|
|||
{}
|
||||
action( const action& rhs )
|
||||
: r_( const_cast< action& >( rhs ).r_.release() )
|
||||
, f_( r_.get() ? lambda_type::make_val( boost::ref( r_ ) ) : rhs.f_ )
|
||||
, f_( r_.get()
|
||||
? lambda_type::make_val( boost::ref( r_ ) )
|
||||
: rhs.f_ )
|
||||
{}
|
||||
|
||||
template< typename Value >
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2010
|
||||
// Copyright Mathieu Champlon 2010
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_ARGS_HPP_INCLUDED
|
||||
#define MOCK_ARGS_HPP_INCLUDED
|
||||
|
|
@ -50,7 +51,8 @@ namespace detail
|
|||
}
|
||||
|
||||
#define MOCK_ARG(N, n, S, tpn) \
|
||||
BOOST_PP_COMMA_IF(n) tpn mock::detail::arg< S, BOOST_PP_INC(n), N >::type p##n
|
||||
BOOST_PP_COMMA_IF(n) tpn \
|
||||
mock::detail::arg< S, BOOST_PP_INC(n), N >::type p##n
|
||||
#define MOCK_ARG_PROXY(z, n, d) \
|
||||
MOCK_ARG( \
|
||||
BOOST_PP_ARRAY_ELEM(0, d), \
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_BOOST_TEST_ERROR_POLICY_HPP_INCLUDED
|
||||
#define MOCK_BOOST_TEST_ERROR_POLICY_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_CHECK_HPP_INCLUDED
|
||||
#define MOCK_CHECK_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_CHILD_HPP_INCLUDED
|
||||
#define MOCK_CHILD_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_CLEANUP_HPP_INCLUDED
|
||||
#define MOCK_CLEANUP_HPP_INCLUDED
|
||||
|
|
@ -24,7 +25,9 @@ namespace detail
|
|||
{
|
||||
~cleanup()
|
||||
{
|
||||
//mock::verify(); // $$$$ MAT : because of a bug in Boost.Test this will crash if anything needs to be logged
|
||||
// $$$$ MAT : because of a bug in Boost.Test
|
||||
// this will crash if anything needs to be logged
|
||||
//mock::verify();
|
||||
mock::reset();
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2009
|
||||
// Copyright Mathieu Champlon 2009
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_CONFIG_HPP_INCLUDED
|
||||
#define MOCK_CONFIG_HPP_INCLUDED
|
||||
|
|
@ -13,7 +14,7 @@
|
|||
#include <boost/preprocessor/comparison/less.hpp>
|
||||
|
||||
#ifndef MOCK_MAX_ARGS
|
||||
# define MOCK_MAX_ARGS 9
|
||||
# define MOCK_MAX_ARGS 9
|
||||
#elif BOOST_PP_LESS(9, MOCK_MAX_ARGS)
|
||||
# define MOCK_USE_BOOST_PHOENIX
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_CONSTRAINT_HPP_INCLUDED
|
||||
#define MOCK_CONSTRAINT_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_CONSTRAINTS_HPP_INCLUDED
|
||||
#define MOCK_CONSTRAINTS_HPP_INCLUDED
|
||||
|
|
@ -67,7 +68,8 @@ namespace mock
|
|||
} \
|
||||
friend std::ostream& operator<<( std::ostream& s, const N& n ) \
|
||||
{ \
|
||||
return s << BOOST_STRINGIZE(N) << "( " << mock::format( n.expected_ ) << " )"; \
|
||||
return s << BOOST_STRINGIZE(N) \
|
||||
<< "( " << mock::format( n.expected_ ) << " )"; \
|
||||
} \
|
||||
Expected expected_; \
|
||||
}; \
|
||||
|
|
@ -186,11 +188,12 @@ namespace detail
|
|||
{}
|
||||
bool operator()( const std::string& actual ) const
|
||||
{
|
||||
return actual.find( boost::unwrap_ref( expected_ ) ) != std::string::npos;
|
||||
return actual.find( boost::unwrap_ref( expected_ ) )
|
||||
!= std::string::npos;
|
||||
}
|
||||
friend std::ostream& operator<<( std::ostream& s, const contain& n )
|
||||
{
|
||||
return s << "contain ( " << mock::format( n.expected_ ) << " )";
|
||||
return s << "contain( " << mock::format( n.expected_ ) << " )";
|
||||
}
|
||||
Expected expected_;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_CONTEXT_HPP_INCLUDED
|
||||
#define MOCK_CONTEXT_HPP_INCLUDED
|
||||
|
|
@ -34,7 +35,8 @@ namespace detail
|
|||
virtual void add( verifiable& v ) = 0;
|
||||
virtual void remove( verifiable& v ) = 0;
|
||||
|
||||
virtual void serialize( std::ostream& s, const verifiable& v ) const = 0;
|
||||
virtual void serialize( std::ostream& s,
|
||||
const verifiable& v ) const = 0;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_DEFAULT_ERROR_POLICY_HPP_INCLUDED
|
||||
#define MOCK_DEFAULT_ERROR_POLICY_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_ERROR_HPP_INCLUDED
|
||||
#define MOCK_ERROR_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_EXPECTATION_HPP_INCLUDED
|
||||
#define MOCK_EXPECTATION_HPP_INCLUDED
|
||||
|
|
@ -96,7 +97,9 @@ namespace detail
|
|||
boost::shared_ptr< detail::invocation > i_;
|
||||
|
||||
private:
|
||||
typedef std::vector< boost::shared_ptr< detail::sequence_impl > > sequences_type;
|
||||
typedef std::vector<
|
||||
boost::shared_ptr< detail::sequence_impl >
|
||||
> sequences_type;
|
||||
typedef sequences_type::const_iterator sequences_cit;
|
||||
|
||||
sequences_type sequences_;
|
||||
|
|
@ -160,7 +163,8 @@ namespace detail
|
|||
|
||||
MOCK_EXPECTATION_METHODS
|
||||
|
||||
friend std::ostream& operator<<( std::ostream& s, const expectation& m )
|
||||
friend std::ostream& operator<<( std::ostream& s,
|
||||
const expectation& m )
|
||||
{
|
||||
return s << (m.i_->exhausted() ? 'v' : '.') << ' ' << *m.i_;
|
||||
}
|
||||
|
|
@ -173,23 +177,40 @@ namespace detail
|
|||
boost::function_types::parameter_types< Signature >, \
|
||||
n \
|
||||
>::type arg##n##_type;
|
||||
#define MOCK_EXPECTATION_CONSTRUCTOR(z, n, d) BOOST_PP_COMMA_IF(n) c##n##_( new detail::check< arg##n##_type, constraint< detail::any > >( mock::any ) )
|
||||
#define MOCK_EXPECTATION_WITH(z, n, d) c##n##_.reset( new detail::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##_;
|
||||
#define MOCK_EXPECTATION_ARGS(z, n, d) BOOST_PP_COMMA_IF(n) arg##n##_type a##n
|
||||
#define MOCK_EXPECTATION_IS_VALID(z, n, d) && (*c##n##_)( a##n )
|
||||
#define MOCK_EXPECTATION_SERIALIZE(z, n, d) BOOST_PP_IF(n, << ", " <<,) *m.c##n##_
|
||||
#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 ) )
|
||||
#define MOCK_EXPECTATION_WITH(z, n, d) \
|
||||
c##n##_.reset( \
|
||||
new detail::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##_;
|
||||
#define MOCK_EXPECTATION_ARGS(z, n, d) \
|
||||
BOOST_PP_COMMA_IF(n) arg##n##_type a##n
|
||||
#define MOCK_EXPECTATION_IS_VALID(z, n, d) \
|
||||
&& (*c##n##_)( a##n )
|
||||
#define MOCK_EXPECTATION_SERIALIZE(z, n, d) \
|
||||
BOOST_PP_IF(n, << ", " <<,) *m.c##n##_
|
||||
#define MOCK_EXPECTATION(z, n, d) \
|
||||
template< typename Signature > \
|
||||
class expectation< Signature, n > \
|
||||
: public expectation_base \
|
||||
, public action< BOOST_DEDUCED_TYPENAME \
|
||||
boost::function_types::result_type< Signature >::type, Signature > \
|
||||
, public action< \
|
||||
BOOST_DEDUCED_TYPENAME \
|
||||
boost::function_types::result_type< Signature >::type, \
|
||||
Signature \
|
||||
> \
|
||||
{ \
|
||||
BOOST_PP_REPEAT(n, MOCK_EXPECTATION_TYPEDEF, BOOST_PP_EMPTY) \
|
||||
public: \
|
||||
expectation() \
|
||||
: BOOST_PP_REPEAT(n, MOCK_EXPECTATION_CONSTRUCTOR, BOOST_PP_EMPTY) \
|
||||
: BOOST_PP_REPEAT(n, MOCK_EXPECTATION_INITIALIZE, BOOST_PP_EMPTY) \
|
||||
{} \
|
||||
template< BOOST_PP_ENUM_PARAMS(n, typename Constraint_) > \
|
||||
expectation& with( BOOST_PP_ENUM_BINARY_PARAMS(n, Constraint_, c) ) \
|
||||
|
|
@ -197,27 +218,36 @@ namespace detail
|
|||
BOOST_PP_REPEAT(n, MOCK_EXPECTATION_WITH, BOOST_PP_EMPTY) \
|
||||
return *this; \
|
||||
} \
|
||||
bool is_valid( BOOST_PP_REPEAT(n, MOCK_EXPECTATION_ARGS, BOOST_PP_EMPTY) ) const \
|
||||
bool is_valid( \
|
||||
BOOST_PP_REPEAT(n, MOCK_EXPECTATION_ARGS, BOOST_PP_EMPTY) ) const \
|
||||
{ \
|
||||
return ! i_->exhausted() \
|
||||
BOOST_PP_REPEAT(n, MOCK_EXPECTATION_IS_VALID, BOOST_PP_EMPTY); \
|
||||
BOOST_PP_REPEAT(n, \
|
||||
MOCK_EXPECTATION_IS_VALID, BOOST_PP_EMPTY); \
|
||||
} \
|
||||
MOCK_EXPECTATION_METHODS \
|
||||
friend std::ostream& operator<<( std::ostream& s, const expectation& m ) \
|
||||
friend std::ostream& operator<<( \
|
||||
std::ostream& s, const expectation& m ) \
|
||||
{ \
|
||||
return s << (m.i_->exhausted() ? 'v' : '.') << ' ' << *m.i_ << ".with( " \
|
||||
<< \
|
||||
BOOST_PP_REPEAT(n, MOCK_EXPECTATION_SERIALIZE, BOOST_PP_EMPTY) \
|
||||
return s << (m.i_->exhausted() ? 'v' : '.') \
|
||||
<< ' ' << *m.i_ << ".with( " \
|
||||
<< BOOST_PP_REPEAT(n, \
|
||||
MOCK_EXPECTATION_SERIALIZE, BOOST_PP_EMPTY) \
|
||||
<< " )"; \
|
||||
} \
|
||||
private: \
|
||||
BOOST_PP_REPEAT(n, MOCK_EXPECTATION_MEMBER, BOOST_PP_EMPTY) \
|
||||
};
|
||||
BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(MOCK_MAX_ARGS), MOCK_EXPECTATION, BOOST_PP_EMPTY)
|
||||
|
||||
BOOST_PP_REPEAT_FROM_TO(
|
||||
1,
|
||||
BOOST_PP_INC(MOCK_MAX_ARGS),
|
||||
MOCK_EXPECTATION,
|
||||
BOOST_PP_EMPTY)
|
||||
|
||||
#undef MOCK_EXPECTATION_METHODS
|
||||
#undef MOCK_EXPECTATION_TYPEDEF
|
||||
#undef MOCK_EXPECTATION_CONSTRUCTOR
|
||||
#undef MOCK_EXPECTATION_INITIALIZE
|
||||
#undef MOCK_EXPECTATION_WITH
|
||||
#undef MOCK_EXPECTATION_MEMBER
|
||||
#undef MOCK_EXPECTATION_ARGS
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_FUNCTION_HPP_INCLUDED
|
||||
#define MOCK_FUNCTION_HPP_INCLUDED
|
||||
|
|
@ -101,7 +102,13 @@ namespace mock
|
|||
{ \
|
||||
return (*impl_)( BOOST_PP_ENUM_PARAMS(n, p) ); \
|
||||
}
|
||||
BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(MOCK_MAX_ARGS), MOCK_FUNCTION_OPERATOR, BOOST_PP_EMPTY)
|
||||
|
||||
BOOST_PP_REPEAT_FROM_TO(
|
||||
1,
|
||||
BOOST_PP_INC(MOCK_MAX_ARGS),
|
||||
MOCK_FUNCTION_OPERATOR,
|
||||
BOOST_PP_EMPTY)
|
||||
|
||||
#undef MOCK_FUNCTION_OPERATOR
|
||||
|
||||
friend std::ostream& operator<<( std::ostream& s, const function& e )
|
||||
|
|
@ -201,40 +208,49 @@ namespace mock
|
|||
}
|
||||
|
||||
#define MOCK_FUNCTION_FORMAT(z, n, N) \
|
||||
<< " " << mock::format( p##n ) << BOOST_PP_IF(BOOST_PP_EQUAL(N,n), " ", ",")
|
||||
#define MOCK_FUNCTION_CALL_CONTEXT(n) \
|
||||
<< " " << mock::format( p##n ) \
|
||||
<< BOOST_PP_IF(BOOST_PP_EQUAL(N,n), " ", ",")
|
||||
#define MOCK_FUNCTION_CONTEXT(n) \
|
||||
boost::unit_test::lazy_ostream::instance() \
|
||||
<< lazy_context( this ) \
|
||||
<< "(" BOOST_PP_REPEAT(n, MOCK_FUNCTION_FORMAT, BOOST_PP_DEC(n)) << ")" \
|
||||
<< "(" BOOST_PP_REPEAT(n, MOCK_FUNCTION_FORMAT, BOOST_PP_DEC(n)) \
|
||||
<< ")" \
|
||||
<< lazy_expectations( this )
|
||||
#define MOCK_FUNCTION_INVOKE(z, n, A) \
|
||||
{ \
|
||||
valid_ = false; \
|
||||
for( expectations_cit it = expectations_.begin(); it != expectations_.end(); ++it ) \
|
||||
for( expectations_cit it = expectations_.begin(); \
|
||||
it != expectations_.end(); ++it ) \
|
||||
if( it->is_valid( BOOST_PP_ENUM_PARAMS(n, p) ) ) \
|
||||
{ \
|
||||
if( ! it->invoke() ) \
|
||||
{ \
|
||||
error_type::sequence_failed( MOCK_FUNCTION_CALL_CONTEXT(n), it->file(), it->line() ); \
|
||||
error_type::sequence_failed( \
|
||||
MOCK_FUNCTION_CONTEXT(n), it->file(), it->line() ); \
|
||||
return A; \
|
||||
} \
|
||||
if( ! it->functor() ) \
|
||||
{ \
|
||||
error_type::missing_action( MOCK_FUNCTION_CALL_CONTEXT(n), it->file(), it->line() ); \
|
||||
error_type::missing_action( \
|
||||
MOCK_FUNCTION_CONTEXT(n), it->file(), it->line() ); \
|
||||
return A; \
|
||||
} \
|
||||
valid_ = true; \
|
||||
error_type::expected_call( MOCK_FUNCTION_CALL_CONTEXT(n), it->file(), it->line() ); \
|
||||
error_type::expected_call( \
|
||||
MOCK_FUNCTION_CONTEXT(n), it->file(), it->line() ); \
|
||||
return it->functor()( BOOST_PP_ENUM_PARAMS(n, p) ); \
|
||||
} \
|
||||
error_type::unexpected_call( MOCK_FUNCTION_CALL_CONTEXT(n) ); \
|
||||
error_type::unexpected_call( MOCK_FUNCTION_CONTEXT(n) ); \
|
||||
return A; \
|
||||
}
|
||||
#define MOCK_FUNCTION_OPERATOR(z, n, P) \
|
||||
MOCK_DECL(operator(), n, Signature, const, BOOST_DEDUCED_TYPENAME) \
|
||||
MOCK_FUNCTION_INVOKE(z, n, P)
|
||||
|
||||
BOOST_PP_REPEAT(BOOST_PP_INC(MOCK_MAX_ARGS), MOCK_FUNCTION_OPERATOR, error_type::abort())
|
||||
BOOST_PP_REPEAT(
|
||||
BOOST_PP_INC(MOCK_MAX_ARGS),
|
||||
MOCK_FUNCTION_OPERATOR,
|
||||
error_type::abort())
|
||||
|
||||
void test() const
|
||||
MOCK_FUNCTION_INVOKE(, 0,)
|
||||
|
|
@ -242,9 +258,10 @@ namespace mock
|
|||
#undef MOCK_FUNCTION_FORMAT
|
||||
#undef MOCK_FUNCTION_OPERATOR
|
||||
#undef MOCK_FUNCTION_INVOKE
|
||||
#undef MOCK_FUNCTION_CALL_CONTEXT
|
||||
#undef MOCK_FUNCTION_CONTEXT
|
||||
|
||||
friend std::ostream& operator<<( std::ostream& s, const function_impl& e )
|
||||
friend std::ostream& operator<<(
|
||||
std::ostream& s, const function_impl& e )
|
||||
{
|
||||
return s << lazy_context( &e ) << lazy_expectations( &e );
|
||||
}
|
||||
|
|
@ -254,7 +271,8 @@ namespace mock
|
|||
lazy_context( const function_impl* impl )
|
||||
: impl_( impl )
|
||||
{}
|
||||
friend std::ostream& operator<<( std::ostream& s, const lazy_context& e )
|
||||
friend std::ostream& operator<<(
|
||||
std::ostream& s, const lazy_context& e )
|
||||
{
|
||||
if( e.impl_->context_ )
|
||||
e.impl_->context_->serialize( s, *e.impl_ );
|
||||
|
|
@ -270,7 +288,8 @@ namespace mock
|
|||
lazy_expectations( const function_impl* impl )
|
||||
: impl_( impl )
|
||||
{}
|
||||
friend std::ostream& operator<<( std::ostream& s, const lazy_expectations& e )
|
||||
friend std::ostream& operator<<(
|
||||
std::ostream& s, const lazy_expectations& e )
|
||||
{
|
||||
for( expectations_cit it = e.impl_->expectations_.begin();
|
||||
it != e.impl_->expectations_.end(); ++it )
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_GROUP_HPP_INCLUDED
|
||||
#define MOCK_GROUP_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_INVOCATION_HPP_INCLUDED
|
||||
#define MOCK_INVOCATION_HPP_INCLUDED
|
||||
|
|
@ -30,7 +31,8 @@ namespace detail
|
|||
virtual bool invoked() const = 0;
|
||||
virtual bool exhausted() const = 0;
|
||||
|
||||
friend inline std::ostream& operator<<( std::ostream& s, const invocation& i )
|
||||
friend inline std::ostream& operator<<(
|
||||
std::ostream& s, const invocation& i )
|
||||
{
|
||||
return i.serialize( s );
|
||||
}
|
||||
|
|
@ -43,8 +45,8 @@ namespace detail
|
|||
{
|
||||
public:
|
||||
between( std::size_t min, std::size_t max )
|
||||
: min_ ( min )
|
||||
, max_ ( max )
|
||||
: min_( min )
|
||||
, max_( max )
|
||||
, count_( 0 )
|
||||
{
|
||||
if( min > max )
|
||||
|
|
@ -81,7 +83,8 @@ namespace detail
|
|||
private:
|
||||
virtual std::ostream& serialize( std::ostream& s ) const
|
||||
{
|
||||
return s << "between( " << count_ << "/[" << min_ << ',' << max_ << "] )";
|
||||
return s << "between( " << count_
|
||||
<< "/[" << min_ << ',' << max_ << "] )";
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -95,7 +98,7 @@ namespace detail
|
|||
private:
|
||||
virtual std::ostream& serialize( std::ostream& s ) const
|
||||
{
|
||||
return s << "exactly( " << count_ << '/' << max_ << " )";
|
||||
return s << "exactly( " << count_ << '/' << max_ << " )";
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -137,7 +140,7 @@ namespace detail
|
|||
private:
|
||||
virtual std::ostream& serialize( std::ostream& s ) const
|
||||
{
|
||||
return s << "at_least( " << count_ << '/' << min_ << " )";
|
||||
return s << "at_least( " << count_ << '/' << min_ << " )";
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -151,7 +154,7 @@ namespace detail
|
|||
private:
|
||||
virtual std::ostream& serialize( std::ostream& s ) const
|
||||
{
|
||||
return s << "at_most( " << count_ << '/' << max_ << " )";
|
||||
return s << "at_most( " << count_ << '/' << max_ << " )";
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2009
|
||||
// Copyright Mathieu Champlon 2009
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_IS_FUNCTOR_HPP_INCLUDED
|
||||
#define MOCK_IS_FUNCTOR_HPP_INCLUDED
|
||||
|
|
@ -21,10 +22,13 @@ namespace mock
|
|||
namespace detail
|
||||
{
|
||||
#define MOCK_IS_FUNCTION_HELPER(N, M) \
|
||||
template< typename T > yes_type& N##_helper( BOOST_DEDUCED_TYPENAME T::M* ); \
|
||||
template< typename T > yes_type& N##_helper( \
|
||||
BOOST_DEDUCED_TYPENAME T::M* ); \
|
||||
template< typename T > no_type& N##_helper( ... ); \
|
||||
template< typename T > struct N \
|
||||
: boost::mpl::bool_< sizeof( N##_helper< T >( 0 ) ) == sizeof( yes_type ) > \
|
||||
: boost::mpl::bool_< \
|
||||
sizeof( N##_helper< T >( 0 ) ) == sizeof( yes_type ) \
|
||||
> \
|
||||
{};
|
||||
|
||||
MOCK_IS_FUNCTION_HELPER( has_result_type, result_type )
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_LAMBDA_HPP_INCLUDED
|
||||
#define MOCK_LAMBDA_HPP_INCLUDED
|
||||
|
|
@ -41,7 +42,8 @@ namespace detail
|
|||
template< typename T >
|
||||
static functor_type make_val( boost::reference_wrapper< T > t )
|
||||
{
|
||||
return mock::detail::bind( &do_ref_identity< T >, t.get_pointer() );
|
||||
return mock::detail::bind(
|
||||
&do_ref_identity< T >, t.get_pointer() );
|
||||
}
|
||||
template< typename T >
|
||||
static functor_type make_throw( T t )
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_LOG_HPP_INCLUDED
|
||||
#define MOCK_LOG_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_MOCK_HPP_INCLUDED
|
||||
#define MOCK_MOCK_HPP_INCLUDED
|
||||
|
|
@ -103,7 +104,9 @@ namespace detail
|
|||
|
||||
#define MOCK_SIGNATURE(M) \
|
||||
mock::detail::signature< \
|
||||
BOOST_TYPEOF( mock::ambiguous_method_name_use_MOCK_METHOD_EXT_instead( &base_type::M ) ) \
|
||||
BOOST_TYPEOF( \
|
||||
mock::ambiguous_method_name_use_MOCK_METHOD_EXT_instead( \
|
||||
&base_type::M ) ) \
|
||||
>::type
|
||||
|
||||
#define MOCK_METHOD_AUX(M, n, S, t, c, tpn) \
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_NODE_HPP_INCLUDED
|
||||
#define MOCK_NODE_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_OBJECT_HPP_INCLUDED
|
||||
#define MOCK_OBJECT_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2010
|
||||
// Copyright Mathieu Champlon 2010
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_OPERATORS_HPP_INCLUDED
|
||||
#define MOCK_OPERATORS_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_PARENT_HPP_INCLUDED
|
||||
#define MOCK_PARENT_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_ROOT_HPP_INCLUDED
|
||||
#define MOCK_ROOT_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_SEQUENCE_HPP_INCLUDED
|
||||
#define MOCK_SEQUENCE_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2009
|
||||
// Copyright Mathieu Champlon 2009
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_TYPE_NAME_HPP_INCLUDED
|
||||
#define MOCK_TYPE_NAME_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_VERIFIABLE_HPP_INCLUDED
|
||||
#define MOCK_VERIFIABLE_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_YES_NO_TYPE_HPP_INCLUDED
|
||||
#define MOCK_YES_NO_TYPE_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include <turtle/mock.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#define MOCK_MAX_ARGS 10
|
||||
#include <turtle/mock.hpp>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#define MOCK_MAX_ARGS 20
|
||||
#include <turtle/mock.hpp>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#define MOCK_MAX_ARGS 30
|
||||
#include <turtle/mock.hpp>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#define MOCK_MAX_ARGS 30
|
||||
#include <turtle/mock.hpp>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include <turtle/mock.hpp>
|
||||
#ifdef _MSC_VER
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#define MOCK_MAX_ARGS 10
|
||||
#include <turtle/mock.hpp>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#define MOCK_MAX_ARGS 20
|
||||
#include <turtle/mock.hpp>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#define MOCK_MAX_ARGS 30
|
||||
#include <turtle/mock.hpp>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#define BOOST_AUTO_TEST_MAIN
|
||||
#include <boost/test/auto_unit_test.hpp>
|
||||
|
|
@ -20,12 +21,12 @@ namespace
|
|||
fixture()
|
||||
{
|
||||
std::cout << __FUNCTION__ << std::endl;
|
||||
//BOOST_FAIL( "oups" );
|
||||
BOOST_FAIL( "oups" );
|
||||
}
|
||||
~fixture()
|
||||
{
|
||||
std::cout << __FUNCTION__ << std::endl;
|
||||
//BOOST_FAIL( "oups" );
|
||||
BOOST_FAIL( "oups" );
|
||||
}
|
||||
};
|
||||
BOOST_GLOBAL_FIXTURE( fixture );
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include <turtle/mock.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include <turtle/mock.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include <turtle/mock.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include <turtle/mock.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include <turtle/mock.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include <turtle/mock.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include <turtle/mock.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include <turtle/mock.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include <turtle/mock.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include <turtle/mock.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include <turtle/mock.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include <turtle/mock.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2012
|
||||
// Copyright Mathieu Champlon 2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#define BOOST_AUTO_TEST_MAIN
|
||||
#include "hippomocks.h"
|
||||
|
|
@ -36,12 +37,12 @@ BOOST_AUTO_TEST_CASE( hmm )
|
|||
|
||||
//namespace
|
||||
//{
|
||||
// void free_function() { std::cout << "ok" << std::endl; }
|
||||
// void free_function() { std::cout << "ok" << std::endl; }
|
||||
//}
|
||||
//
|
||||
//BOOST_AUTO_TEST_CASE( hmm2 )
|
||||
//{
|
||||
// MockRepository mocks;
|
||||
// mocks.ExpectCallFunc( free_function );
|
||||
// free_function();
|
||||
// MockRepository mocks;
|
||||
// mocks.ExpectCallFunc( free_function );
|
||||
// free_function();
|
||||
//}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include "pch_test.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2011
|
||||
// Copyright Mathieu Champlon 2011
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
//#include <boost/spirit/home/phoenix/statement/throw.hpp>
|
||||
//#include <boost/spirit/home/phoenix/operator/self.hpp>
|
||||
|
|
@ -28,28 +29,28 @@
|
|||
#include <turtle/mock.hpp>
|
||||
//#include <boost/test/auto_unit_test.hpp>
|
||||
|
||||
// release vc80
|
||||
// release vc80
|
||||
//
|
||||
// xeumeuleu/xml.h 24
|
||||
// xeumeuleu/xml.h 24
|
||||
|
||||
// boost/shared_ptr.hpp 5
|
||||
// boost/bind.hpp 6
|
||||
// boost/type_traits.hpp 19
|
||||
// boost/function_types/function_type.hpp 19
|
||||
// boost/function.hpp 23
|
||||
// boost/function.hpp + boost/bind.hpp 25
|
||||
// boost/lambda/lambda.hpp 25
|
||||
// boost/lambda/bind.hpp 22
|
||||
// boost/function_types/function_type.hpp + boost/type_traits.hpp 36
|
||||
// boost/spirit/home/phoenix/core.hpp 46
|
||||
// boost/shared_ptr.hpp 5
|
||||
// boost/bind.hpp 6
|
||||
// boost/type_traits.hpp 19
|
||||
// boost/function_types/function_type.hpp 19
|
||||
// boost/function.hpp 23
|
||||
// boost/function.hpp + boost/bind.hpp 25
|
||||
// boost/lambda/lambda.hpp 25
|
||||
// boost/lambda/bind.hpp 22
|
||||
// boost/function_types/function_type.hpp + boost/type_traits.hpp 36
|
||||
// boost/spirit/home/phoenix/core.hpp 46
|
||||
//
|
||||
// boost/test/auto_unit_test.hpp 27
|
||||
// turtle/mock.hpp 89
|
||||
// boost/test/auto_unit_test.hpp + turtle/mock.hpp 93
|
||||
// boost/test/auto_unit_test.hpp 27
|
||||
// turtle/mock.hpp 89
|
||||
// boost/test/auto_unit_test.hpp + turtle/mock.hpp 93
|
||||
//
|
||||
// all boost includes from turtle 89
|
||||
// all boost includes from turtle 89
|
||||
|
||||
// getting rid of :
|
||||
// boost/bind 3
|
||||
// function_type 13
|
||||
// boost/phoenix 31
|
||||
// getting rid of :
|
||||
// boost/bind 3
|
||||
// function_type 13
|
||||
// boost/phoenix 31
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include <turtle/constraints.hpp>
|
||||
#include <turtle/operators.hpp>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include <turtle/error.hpp>
|
||||
#include <boost/test/auto_unit_test.hpp>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#define BOOST_AUTO_TEST_MAIN
|
||||
#include "mock_error.hpp"
|
||||
|
|
@ -349,10 +350,10 @@ BOOST_FIXTURE_TEST_CASE( triggering_an_expectation_with_failing_custom_constrain
|
|||
|
||||
//BOOST_FIXTURE_TEST_CASE( literal_zero_can_be_used_in_place_of_null_pointers_in_constraints, error_fixture )
|
||||
//{
|
||||
// mock::function< void( int* ) > f;
|
||||
// f.expect().with( 0 );
|
||||
// f.reset();
|
||||
// CHECK_CALLS( 1 );
|
||||
// mock::function< void( int* ) > f;
|
||||
// f.expect().with( 0 );
|
||||
// f.reset();
|
||||
// CHECK_CALLS( 1 );
|
||||
//}
|
||||
|
||||
// result handling
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include "mock_error.hpp"
|
||||
#include <turtle/mock.hpp>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include <turtle/invocation.hpp>
|
||||
#include <boost/test/auto_unit_test.hpp>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2009
|
||||
// Copyright Mathieu Champlon 2009
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include <turtle/is_functor.hpp>
|
||||
#include <boost/test/auto_unit_test.hpp>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include <turtle/log.hpp>
|
||||
#include <boost/test/auto_unit_test.hpp>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include "mock_error.hpp"
|
||||
#include <turtle/mock.hpp>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#ifndef MOCK_TEST_MOCK_ERROR_HPP_INCLUDED
|
||||
#define MOCK_TEST_MOCK_ERROR_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2009
|
||||
// Copyright Mathieu Champlon 2009
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include <turtle/mock.hpp>
|
||||
#include <boost/test/auto_unit_test.hpp>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include "mock_error.hpp"
|
||||
#include <turtle/object.hpp>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include "mock_error.hpp"
|
||||
#include <turtle/sequence.hpp>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
//
|
||||
// Copyright Mathieu Champlon 2008
|
||||
// Copyright Mathieu Champlon 2008
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://turtle.sf.net for documentation.
|
||||
|
||||
#include <turtle/type_name.hpp>
|
||||
#include <boost/test/auto_unit_test.hpp>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue