Added boost inspect as part of tests run

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@753 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2014-05-31 11:35:36 +00:00
parent 939ca29fb0
commit 5983b75343
31 changed files with 206 additions and 10 deletions

View file

@ -1,3 +1,10 @@
[/
/ Copyright (c) 2014 Mathieu Champlon
/
/ 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)
/]
[section Acknowledgements] [section Acknowledgements]
Many thanks to Adrien Gervaise, Silvin Lubecki and Takatoshi Kondo ! Many thanks to Adrien Gervaise, Silvin Lubecki and Takatoshi Kondo !

View file

@ -1,3 +1,10 @@
[/
/ Copyright (c) 2014 Mathieu Champlon
/
/ 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)
/]
[section Changelog] [section Changelog]
[section 1.2.6] [section 1.2.6]

View file

@ -1,3 +1,10 @@
[/
/ Copyright (c) 2014 Mathieu Champlon
/
/ 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)
/]
[section Customization] [section Customization]
[import example/customization.cpp] [import example/customization.cpp]

View file

@ -1,3 +1,11 @@
// http://turtle.sourceforge.net
//
// Copyright Mathieu Champlon 2014
//
// 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)
//[ prerequisite //[ prerequisite
#define BOOST_AUTO_TEST_MAIN #define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp> #include <boost/test/auto_unit_test.hpp>

View file

@ -1,3 +1,11 @@
// http://turtle.sourceforge.net
//
// Copyright Mathieu Champlon 2014
//
// 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)
#define BOOST_AUTO_TEST_MAIN #define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp> #include <boost/test/auto_unit_test.hpp>
#include <turtle/mock.hpp> #include <turtle/mock.hpp>

View file

@ -1,3 +1,11 @@
// http://turtle.sourceforge.net
//
// Copyright Mathieu Champlon 2014
//
// 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)
#define BOOST_AUTO_TEST_MAIN #define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp> #include <boost/test/auto_unit_test.hpp>
#include <turtle/mock.hpp> #include <turtle/mock.hpp>

View file

@ -1,3 +1,11 @@
// http://turtle.sourceforge.net
//
// Copyright Mathieu Champlon 2014
//
// 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)
#define BOOST_AUTO_TEST_MAIN #define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp> #include <boost/test/auto_unit_test.hpp>
#include <turtle/mock.hpp> #include <turtle/mock.hpp>

View file

@ -1,3 +1,11 @@
// http://turtle.sourceforge.net
//
// Copyright Mathieu Champlon 2014
//
// 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)
#define BOOST_AUTO_TEST_MAIN #define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp> #include <boost/test/auto_unit_test.hpp>
#include <turtle/mock.hpp> #include <turtle/mock.hpp>

View file

@ -1,3 +1,11 @@
// http://turtle.sourceforge.net
//
// Copyright Mathieu Champlon 2014
//
// 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)
#define BOOST_AUTO_TEST_MAIN #define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp> #include <boost/test/auto_unit_test.hpp>
#include <turtle/mock.hpp> #include <turtle/mock.hpp>

View file

@ -1,3 +1,11 @@
// http://turtle.sourceforge.net
//
// Copyright Mathieu Champlon 2014
//
// 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)
#define BOOST_AUTO_TEST_MAIN #define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp> #include <boost/test/auto_unit_test.hpp>
#include <turtle/mock.hpp> #include <turtle/mock.hpp>

View file

@ -1,3 +1,11 @@
// http://turtle.sourceforge.net
//
// Copyright Mathieu Champlon 2014
//
// 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)
#define BOOST_AUTO_TEST_MAIN #define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp> #include <boost/test/auto_unit_test.hpp>
#include <turtle/mock.hpp> #include <turtle/mock.hpp>

View file

@ -1,3 +1,11 @@
// http://turtle.sourceforge.net
//
// Copyright Mathieu Champlon 2014
//
// 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)
#define BOOST_AUTO_TEST_MAIN #define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp> #include <boost/test/auto_unit_test.hpp>
#include <boost/mock/mock.hpp> #include <boost/mock/mock.hpp>

View file

@ -1,3 +1,11 @@
// http://turtle.sourceforge.net
//
// Copyright Mathieu Champlon 2014
//
// 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)
//[ async_call_problem //[ async_call_problem
namespace namespace
{ {

View file

@ -1,3 +1,11 @@
// http://turtle.sourceforge.net
//
// Copyright Mathieu Champlon 2014
//
// 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)
//[ invoke_functor_problem //[ invoke_functor_problem
#include <boost/function.hpp> #include <boost/function.hpp>

View file

@ -1,3 +1,11 @@
// http://turtle.sourceforge.net
//
// Copyright Mathieu Champlon 2014
//
// 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)
//[ quick_constraint_problem //[ quick_constraint_problem
#define BOOST_AUTO_TEST_MAIN #define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp> #include <boost/test/auto_unit_test.hpp>

View file

@ -1,3 +1,11 @@
// http://turtle.sourceforge.net
//
// Copyright Mathieu Champlon 2014
//
// 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)
//[ retrieve_cref_problem //[ retrieve_cref_problem
namespace namespace
{ {

View file

@ -15,6 +15,6 @@ BOOST_AUTO_TEST_CASE( overflow_throws )
{ {
mock_view v; mock_view v;
calculator c( v ); calculator c( v );
BOOST_CHECK_THROW( c.add( std::numeric_limits< int >::max(), 1 ), std::exception ); BOOST_CHECK_THROW( c.add( (std::numeric_limits< int >::max)(), 1 ), std::exception );
} }
//] //]

View file

@ -1,3 +1,11 @@
// http://turtle.sourceforge.net
//
// Copyright Mathieu Champlon 2014
//
// 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)
#define BOOST_AUTO_TEST_MAIN #define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp> #include <boost/test/auto_unit_test.hpp>
#include <turtle/mock.hpp> #include <turtle/mock.hpp>
@ -672,7 +680,8 @@ BOOST_AUTO_TEST_CASE( demonstrates_adding_a_custom_constraint_with_boost_phoenix
//] //]
} }
#if !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_LAMBDAS) #ifndef MOCK_NO_LAMBDAS
namespace constraints_example_7 namespace constraints_example_7
{ {
//[ constraints_example_7 //[ constraints_example_7
@ -688,6 +697,7 @@ BOOST_AUTO_TEST_CASE( demonstrates_adding_a_constraint_with_cxx11_lambda )
} }
//] //]
} }
#endif #endif
namespace constraints_example_8 namespace constraints_example_8

View file

@ -1,3 +1,10 @@
[/
/ Copyright (c) 2014 Mathieu Champlon
/
/ 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)
/]
[section Getting Started] [section Getting Started]
[import example/getting_started.cpp] [import example/getting_started.cpp]

View file

View file

@ -1,3 +1,10 @@
[/
/ Copyright (c) 2014 Mathieu Champlon
/
/ 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)
/]
[section Limitations] [section Limitations]
[import example/limitations_literal_zero.cpp] [import example/limitations_literal_zero.cpp]
[import example/limitations_throw_specifier.cpp] [import example/limitations_throw_specifier.cpp]
@ -155,7 +162,7 @@ Finally another workaround would be to not use the macro at all :
[limitations_comma_in_macro_solution_3] [limitations_comma_in_macro_solution_3]
Note that [@www.boost.org/libs/utility/identity_type/doc/html/index.html Boost.IdentityType] is of little help here because the type is by essence very often abstract, which doesn't work well for some compilers (e.g. gcc). Note that [@http://www.boost.org/libs/utility/identity_type/doc/html/index.html Boost.IdentityType] is of little help here because the type is by essence very often abstract, which doesn't work well for some compilers (e.g. gcc).
[endsect] [endsect]

View file

@ -1,3 +1,10 @@
[/
/ Copyright (c) 2014 Mathieu Champlon
/
/ 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)
/]
[article Turtle [article Turtle
[quickbook 1.5] [quickbook 1.5]
[/ [authors [Champlon, Mathieu]] ] [/ [authors [Champlon, Mathieu]] ]

View file

@ -1,3 +1,10 @@
[/
/ Copyright (c) 2014 Mathieu Champlon
/
/ 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)
/]
[section Motivation] [section Motivation]
[import example/motivation.cpp] [import example/motivation.cpp]
[import example/calculator.hpp] [import example/calculator.hpp]

View file

@ -1,3 +1,10 @@
[/
/ Copyright (c) 2014 Mathieu Champlon
/
/ 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)
/]
[section Patterns] [section Patterns]
[import example/patterns_async_call.cpp] [import example/patterns_async_call.cpp]
[import example/patterns_retrieve_cref.cpp] [import example/patterns_retrieve_cref.cpp]

View file

@ -1,3 +1,10 @@
[/
/ Copyright (c) 2014 Mathieu Champlon
/
/ 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)
/]
[section:rationale Rationale] [section:rationale Rationale]
[import example/rationale.cpp] [import example/rationale.cpp]

View file

@ -1,3 +1,10 @@
[/
/ Copyright (c) 2014 Mathieu Champlon
/
/ 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)
/]
[section Reference] [section Reference]
[import example/reference.cpp] [import example/reference.cpp]

View file

@ -15,6 +15,14 @@ project
<include>../include <include>../include
; ;
path-constant parent : .. ;
alias mock_inspect :
[ run /boost/tools/inspect//inspect/<variant>release
: $(parent) -text -brief : : : inspect
]
;
rule run-test ( name ) rule run-test ( name )
{ {
run $(name) undefined.cpp /boost//unit_test_framework : : : : $(name)_ ; run $(name) undefined.cpp /boost//unit_test_framework : : : : $(name)_ ;

View file

@ -155,7 +155,7 @@
<fileset dir="boostbook"/> <fileset dir="boostbook"/>
</copy> </copy>
<copy todir="${boost-mock.dir}/doc/html"> <copy todir="${boost-mock.dir}/doc/html">
<fileset dir="${boost.root}/doc/src" includes="**/*.css,**/**.png"/> <fileset dir="${boost.root}/doc/src" includes="**/boostbook.css,**/**.png"/>
<fileset dir="boost/doc" includes="images/*.png"/> <fileset dir="boost/doc" includes="images/*.png"/>
</copy> </copy>
<copy todir="${boost-mock.dir}" overwrite="true"> <copy todir="${boost-mock.dir}" overwrite="true">

View file

@ -142,7 +142,7 @@ BOOST_AUTO_TEST_CASE( class_with_sig_is_functor )
is_functor( sig_functor() ); is_functor( sig_functor() );
} }
#if !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_LAMBDAS) #ifndef MOCK_NO_LAMBDAS
BOOST_AUTO_TEST_CASE( cxx11_lambda_is_functor ) BOOST_AUTO_TEST_CASE( cxx11_lambda_is_functor )
{ {

View file

@ -17,10 +17,6 @@
struct mock_error_data_t : boost::unit_test::singleton< mock_error_data_t > struct mock_error_data_t : boost::unit_test::singleton< mock_error_data_t >
{ {
~mock_error_data_t()
{
assert( verify() );
}
void reset() void reset()
{ {
call_count = 0; call_count = 0;

View file

@ -6,6 +6,8 @@
// (See accompanying file LICENSE_1_0.txt or copy at // (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
// boost-no-inspect
#ifndef MOCK_CONFIG_HPP_INCLUDED #ifndef MOCK_CONFIG_HPP_INCLUDED
#define MOCK_CONFIG_HPP_INCLUDED #define MOCK_CONFIG_HPP_INCLUDED
@ -90,4 +92,10 @@
# endif # endif
#endif #endif
#if !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_LAMBDAS)
# ifndef MOCK_NO_LAMBDAS
# define MOCK_NO_LAMBDAS
# endif
#endif
#endif // MOCK_CONFIG_HPP_INCLUDED #endif // MOCK_CONFIG_HPP_INCLUDED