Defines |
|
#define | COMPILE_FAIL(n) void n() |
Check for compile failure. |
|
#define | SENF_CHECK_NO_THROW(expr) |
Show exception information. |
|
#define | SENF_CHECK_EQUAL_COLLECTIONS(left_begin, left_end, right_begin, right_end) |
Check ranges for equality, writing char's as int's. |
|
#define | SENF_AUTO_UNIT_TEST(name) |
Define new test case. |
|
#define | SENF_CHECK_NOT_EQUAL(Left, Rigth) |
Check for non-equality. |
#define | ||||
COMPILE_FAIL | ( | n | ) | |
Check for compile failure.
COMPILE_FAIL()
is used to check, that a certain piece of code will produce a compile time failure.
#ifdef COMPILE_CHECK COMPILE_FAIL(foo) { // fails to compile .... int x = "foo"; } COMPILE_FAIL(bar) { ... } #endif
This check is performed by the extended unit-test builder in senfscons
.
Definition at line 84 of file auto_unit_test.hh.
#define | ||||
SENF_AUTO_UNIT_TEST | ( | name | ) | |
Define new test case.
SENF_AUTO_UNIT_TEST()
is like BOOST_AUTO_UNIT_TEST()
. The only difference is, that if an exception is thrown in the test case SENF_AUTO_UNIT_TEST()
will write out the complete what-message of the exception.
Definition at line 130 of file auto_unit_test.hh.
#define | ||||
SENF_CHECK_EQUAL_COLLECTIONS | ( | left_begin, | ||
left_end, | ||||
right_begin, | ||||
right_end | ) | |||
Check ranges for equality, writing char's as int's.
SENF_CHECK_EQUAL_COLLECTIONS()
is like BOOST_CHECK_EQUAL_COLLECTIONS()
. The only difference is, that SENF_CHECK_EQUAL_COLLECTIONS()
will write out collection values in numeric form (and not as single characters) if the elements are of any char type. Other types are not affected.
Definition at line 116 of file auto_unit_test.hh.
#define | ||||
SENF_CHECK_NO_THROW | ( | expr | ) | |
Value:
BOOST_CHECK_NO_THROW( \ try { expr ; } \ catch (std::exception & e) { std::cerr << e.what() << std::endl; throw; } )
SENF_CHECK_NO_THROW()
is an extension to BOOST_CHECK_NO_THROW()
which will write out the unabridged exception information when an exception is thrown in addition to signaling an error.
Definition at line 93 of file auto_unit_test.hh.
#define | ||||
SENF_CHECK_NOT_EQUAL | ( | Left, | ||
Rigth | ) | |||
Check for non-equality.
SENF_CHECK_NOT_EQUAL()
is the opposite of BOOST_CHECK_EQUAL
.
Definition at line 152 of file auto_unit_test.hh.