mirror of
https://github.com/boostorg/beast.git
synced 2025-08-05 15:54:46 +02:00
Add BEAST_THROWS
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
Version 272:
|
||||||
|
|
||||||
|
* Add BEAST_THROWS
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
Version 271:
|
Version 271:
|
||||||
|
|
||||||
* Add HTTP async client with system_executor example
|
* Add HTTP async client with system_executor example
|
||||||
|
@@ -639,6 +639,20 @@ run(runner& r)
|
|||||||
(::boost::beast::unit_test::suite::this_suite()->fail((reason), __FILE__, __LINE__), false))
|
(::boost::beast::unit_test::suite::this_suite()->fail((reason), __FILE__, __LINE__), false))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/** Ensure an exception is thrown
|
||||||
|
*/
|
||||||
|
#define BEAST_THROWS( EXPR, EXCEP ) \
|
||||||
|
try { \
|
||||||
|
EXPR; \
|
||||||
|
BEAST_FAIL(); \
|
||||||
|
} \
|
||||||
|
catch(EXCEP const&) { \
|
||||||
|
BEAST_PASS(); \
|
||||||
|
} \
|
||||||
|
catch(...) { \
|
||||||
|
BEAST_FAIL(); \
|
||||||
|
}
|
||||||
|
|
||||||
} // unit_test
|
} // unit_test
|
||||||
} // beast
|
} // beast
|
||||||
} // boost
|
} // boost
|
||||||
|
Reference in New Issue
Block a user