turtle/src/tests/turtle_test/silent_error.hpp
mat007 171accfe27 Merged logging branch
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@245 860be788-9bd5-4423-9f1e-828f051e677b
2011-02-19 22:10:22 +00:00

50 lines
1.6 KiB
C++

//
// 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)
//
#ifndef MOCK_TEST_SILENT_ERROR_HPP_INCLUDED
#define MOCK_TEST_SILENT_ERROR_HPP_INCLUDED
#include <string>
#include <stdexcept>
namespace mock
{
template< typename Result >
struct silent_error
{
static Result abort()
{
throw std::runtime_error( "abort" );
}
template< typename Context >
static void expected_call( const Context& /*context*/,
const std::string& /*file*/, int /*line*/ )
{}
template< typename Context >
static void unexpected_call( const Context& /*context*/ )
{}
template< typename Context >
static void missing_action( const Context& /*context*/,
const std::string& /*file*/, int /*line*/ )
{}
template< typename Context >
static void sequence_failed( const Context& /*context*/,
const std::string& /*file*/, int /*line*/ )
{}
template< typename Context >
static void verification_failed( const Context& /*context*/,
const std::string& /*file*/, int /*line*/ )
{}
template< typename Context >
static void untriggered_expectation( const Context& /*context*/,
const std::string& /*file*/, int /*line*/ )
{}
};
}
#endif // #ifndef MOCK_TEST_SILENT_ERROR_HPP_INCLUDED