Removed default error policy keeping only Boost.Test integration

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@533 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2012-07-30 13:46:35 +00:00
parent 1b3bef3e8c
commit cd3886aede
9 changed files with 110 additions and 243 deletions

View file

@ -1,40 +0,0 @@
// http://turtle.sourceforge.net
//
// 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)
#ifndef MOCK_CLEANUP_HPP_INCLUDED
#define MOCK_CLEANUP_HPP_INCLUDED
#include "../config.hpp"
#ifdef MOCK_USE_BOOST_TEST
#include "root.hpp"
#include <boost/test/unit_test_suite.hpp>
namespace mock
{
namespace detail
{
struct cleanup
{
~cleanup()
{
// $$$$ MAT : because of a bug in Boost.Test
// this will crash if anything needs to be logged
// see https://svn.boost.org/trac/boost/ticket/5563
//mock::verify();
mock::reset();
}
};
BOOST_GLOBAL_FIXTURE( cleanup );
}
} // mock
#endif
#endif // MOCK_CLEANUP_HPP_INCLUDED

View file

@ -8,6 +8,10 @@
#include "expectation_template.hpp"
#ifndef MOCK_ERROR_POLICY
# error no error policy has been set
#endif
#define MOCK_FORMAT(z, n, N) \
<< ' ' << mock::format( t##n ) \
<< BOOST_PP_IF(BOOST_PP_EQUAL(N,n), ' ', ',')