forked from boostorg/nowide
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.hpp
More file actions
25 lines (22 loc) · 726 Bytes
/
test.hpp
File metadata and controls
25 lines (22 loc) · 726 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//
// 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 NOWIDE_LIB_TEST_H_INCLUDED
#define 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