mirror of
https://github.com/boostorg/core.git
synced 2025-07-29 12:27:42 +02:00
Merge branch 'develop' of https://github.com/eldiener/core into develop
This commit is contained in:
@ -32,6 +32,7 @@ When using `lightweight_test.hpp`, *do not forget* to
|
||||
|
||||
``
|
||||
#define BOOST_TEST(expression) /*unspecified*/
|
||||
#define BOOST_TEST_NOT(expression) /*unspecified*/
|
||||
#define BOOST_ERROR(message) /*unspecified*/
|
||||
#define BOOST_TEST_EQ(expr1, expr2) /*unspecified*/
|
||||
#define BOOST_TEST_NE(expr1, expr2) /*unspecified*/
|
||||
@ -56,6 +57,17 @@ message containing `expression`.
|
||||
|
||||
[endsect]
|
||||
|
||||
[section BOOST_TEST_NOT]
|
||||
|
||||
``
|
||||
BOOST_TEST_NOT(expression)
|
||||
``
|
||||
|
||||
If expression is true increases the error count and outputs a
|
||||
message containing `!(expression)`.
|
||||
|
||||
[endsect]
|
||||
|
||||
[section BOOST_ERROR]
|
||||
|
||||
``
|
||||
|
@ -144,6 +144,7 @@ inline int report_errors()
|
||||
} // namespace boost
|
||||
|
||||
#define BOOST_TEST(expr) ((expr)? (void)0: ::boost::detail::test_failed_impl(#expr, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION))
|
||||
#define BOOST_TEST_NOT(expr) BOOST_TEST(!(expr))
|
||||
|
||||
#define BOOST_ERROR(msg) ( ::boost::detail::error_impl(msg, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) )
|
||||
|
||||
|
@ -43,6 +43,16 @@ int main()
|
||||
BOOST_TEST( x++ == 1 );
|
||||
BOOST_TEST( x == 2? true: false );
|
||||
BOOST_TEST( x == 2? &x: 0 );
|
||||
|
||||
// BOOST_TEST_NOT
|
||||
|
||||
BOOST_TEST_NOT( x == 1 );
|
||||
BOOST_TEST_NOT( ++x == 2 );
|
||||
BOOST_TEST_NOT( x++ == 2 );
|
||||
BOOST_TEST_NOT( --x == 2 );
|
||||
BOOST_TEST_NOT( x-- == 2 );
|
||||
BOOST_TEST_NOT( x == 2? false: true );
|
||||
BOOST_TEST_NOT( x == 2? 0: &x );
|
||||
|
||||
// BOOST_TEST_EQ
|
||||
|
||||
|
Reference in New Issue
Block a user