Files
boost_unordered/test/helpers/exception_test.hpp
Daniel James 8214c43060 Unit tests for unordered containers.
[SVN r2731]
2005-11-05 17:24:20 +00:00

34 lines
915 B
C++

// Copyright Daniel James 2005. Use, modification, and distribution are
// subject to 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)
#if !defined(BOOST_UNORDERED_TEST_HELPERS_EXCEPTION_TEST_HEADER)
#define BOOST_UNORDERED_TEST_HELPERS_EXCEPTION_TEST_HEADER
#include <boost/preprocessor/cat.hpp>
#include <exception>
#include "./exception.hpp"
#include "./exception_trigger.hpp"
#include "./base.hpp"
namespace test
{
void exception_start(int);
bool exception_loop_test();
void exception_loop();
void exception_failure();
bool true_once();
}
#define EXCEPTION_TEST(count) \
for(::test::exception_start(count); ::test::exception_loop_test(); \
::test::exception_loop()) \
try
#define EXCEPTION_TEST_END \
catch(::test::exception const&) { ::test::exception_failure(); }
#endif