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]
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 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]
[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
#define BOOST_AUTO_TEST_MAIN
#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
#include <boost/test/auto_unit_test.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
#include <boost/test/auto_unit_test.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
#include <boost/test/auto_unit_test.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
#include <boost/test/auto_unit_test.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
#include <boost/test/auto_unit_test.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
#include <boost/test/auto_unit_test.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
#include <boost/test/auto_unit_test.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
#include <boost/test/auto_unit_test.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
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
#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
#define BOOST_AUTO_TEST_MAIN
#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
namespace
{

View file

@ -15,6 +15,6 @@ BOOST_AUTO_TEST_CASE( overflow_throws )
{
mock_view 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
#include <boost/test/auto_unit_test.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
{
//[ constraints_example_7
@ -688,6 +697,7 @@ BOOST_AUTO_TEST_CASE( demonstrates_adding_a_constraint_with_cxx11_lambda )
}
//]
}
#endif
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]
[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]
[import example/limitations_literal_zero.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]
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]

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
[quickbook 1.5]
[/ [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]
[import example/motivation.cpp]
[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]
[import example/patterns_async_call.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]
[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]
[import example/reference.cpp]

View file

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

View file

@ -155,7 +155,7 @@
<fileset dir="boostbook"/>
</copy>
<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"/>
</copy>
<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() );
}
#if !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_LAMBDAS)
#ifndef MOCK_NO_LAMBDAS
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 >
{
~mock_error_data_t()
{
assert( verify() );
}
void reset()
{
call_count = 0;

View file

@ -6,6 +6,8 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// boost-no-inspect
#ifndef MOCK_CONFIG_HPP_INCLUDED
#define MOCK_CONFIG_HPP_INCLUDED
@ -90,4 +92,10 @@
# 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