2
0
mirror of https://github.com/boostorg/nowide.git synced 2026-02-23 03:42:27 +00:00
Files
nowide/test/test.hpp
2015-10-01 18:57:14 +03:00

26 lines
738 B
C++

//
// Copyright (c) 2012 Artyom Beilis (Tonkikh)
//
// 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 BOOST_NOWIDE_LIB_TEST_H_INCLUDED
#define BOOST_NOWIDE_LIB_TEST_H_INCLUDED
#include <stdexcept>
#include <sstream>
#define TEST(x) do { \
if(x) \
break; \
std::ostringstream ss; \
ss<< "Error " #x " in " << __FILE__ \
<<':'<<__LINE__<<" "<< __FUNCTION__; \
throw std::runtime_error(ss.str()); \
}while(0)
#endif
///
// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4