mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Moved mock::exception in its own header so that it can be included without the error policy
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@582 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
3c0bb8e16e
commit
6d3630f0a2
4 changed files with 29 additions and 4 deletions
|
|
@ -48,6 +48,7 @@
|
||||||
<ClInclude Include="..\..\turtle\detail\type_name.hpp" />
|
<ClInclude Include="..\..\turtle\detail\type_name.hpp" />
|
||||||
<ClInclude Include="..\..\turtle\detail\verifiable.hpp" />
|
<ClInclude Include="..\..\turtle\detail\verifiable.hpp" />
|
||||||
<ClInclude Include="..\..\turtle\error.hpp" />
|
<ClInclude Include="..\..\turtle\error.hpp" />
|
||||||
|
<ClInclude Include="..\..\turtle\exception.hpp" />
|
||||||
<ClInclude Include="..\..\turtle\format.hpp" />
|
<ClInclude Include="..\..\turtle\format.hpp" />
|
||||||
<ClInclude Include="..\..\turtle\log.hpp" />
|
<ClInclude Include="..\..\turtle\log.hpp" />
|
||||||
<ClInclude Include="..\..\turtle\matcher.hpp" />
|
<ClInclude Include="..\..\turtle\matcher.hpp" />
|
||||||
|
|
|
||||||
|
|
@ -124,5 +124,8 @@
|
||||||
<ClInclude Include="..\..\turtle\detail\matcher_base.hpp">
|
<ClInclude Include="..\..\turtle\detail\matcher_base.hpp">
|
||||||
<Filter>Source Files\detail</Filter>
|
<Filter>Source Files\detail</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\turtle\exception.hpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -10,18 +10,15 @@
|
||||||
#define MOCK_ERROR_HPP_INCLUDED
|
#define MOCK_ERROR_HPP_INCLUDED
|
||||||
|
|
||||||
#include "config.hpp"
|
#include "config.hpp"
|
||||||
|
#include "exception.hpp"
|
||||||
#ifdef MOCK_USE_BOOST_TEST
|
#ifdef MOCK_USE_BOOST_TEST
|
||||||
#include <boost/test/framework.hpp>
|
#include <boost/test/framework.hpp>
|
||||||
#include <boost/test/test_tools.hpp>
|
#include <boost/test/test_tools.hpp>
|
||||||
#include <boost/test/unit_test_suite.hpp>
|
#include <boost/test/unit_test_suite.hpp>
|
||||||
#include <boost/test/execution_monitor.hpp>
|
|
||||||
#include <boost/exception/enable_current_exception.hpp>
|
#include <boost/exception/enable_current_exception.hpp>
|
||||||
|
|
||||||
namespace mock
|
namespace mock
|
||||||
{
|
{
|
||||||
struct exception : virtual boost::execution_aborted
|
|
||||||
{};
|
|
||||||
|
|
||||||
template< typename Result >
|
template< typename Result >
|
||||||
struct error
|
struct error
|
||||||
{
|
{
|
||||||
|
|
|
||||||
24
turtle/exception.hpp
Normal file
24
turtle/exception.hpp
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
// http://turtle.sourceforge.net
|
||||||
|
//
|
||||||
|
// 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)
|
||||||
|
|
||||||
|
#ifndef MOCK_EXCEPTION_HPP_INCLUDED
|
||||||
|
#define MOCK_EXCEPTION_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "config.hpp"
|
||||||
|
#ifdef MOCK_USE_BOOST_TEST
|
||||||
|
#include <boost/test/execution_monitor.hpp>
|
||||||
|
|
||||||
|
namespace mock
|
||||||
|
{
|
||||||
|
struct exception : virtual boost::execution_aborted
|
||||||
|
{};
|
||||||
|
} // mock
|
||||||
|
|
||||||
|
#endif // MOCK_USE_BOOST_TEST
|
||||||
|
|
||||||
|
#endif // MOCK_EXCEPTION_HPP_INCLUDED
|
||||||
Loading…
Add table
Add a link
Reference in a new issue