Go to the source code of this file.
Defines | |
| #define | COUNTER_GUARD(type) |
| #define | TEST_REPORT_AUX(x, line, file) report_failure(x, line, file) |
| #define | TEST_CHECK(x) |
| #define | TEST_ERROR(x) TEST_REPORT_AUX((std::string("ERROR: \"") + x + "\"").c_str(), __FILE__, __LINE__) |
| #define | TEST_NOTHROW(x) |
Functions | |
| void | report_failure (char const *str, char const *file, int line) |
| #define COUNTER_GUARD | ( | type | ) |
Value:
struct BOOST_PP_CAT(type, _counter_guard) \ { \ ~BOOST_PP_CAT(type, _counter_guard()) \ { \ TEST_CHECK(counted_type<type>::count == 0); \ } \ } BOOST_PP_CAT(type, _guard)
| #define TEST_CHECK | ( | x | ) |
Value:
if (!(x)) \ TEST_REPORT_AUX("TEST_CHECK failed: \"" #x "\"", __FILE__, __LINE__)
Definition at line 22 of file test.hpp.
Referenced by check_client_vec(), run_storage_tests(), test_main(), test_rules_invariant(), and test_transfer().
| #define TEST_ERROR | ( | x | ) | TEST_REPORT_AUX((std::string("ERROR: \"") + x + "\"").c_str(), __FILE__, __LINE__) |
| #define TEST_NOTHROW | ( | x | ) |
Value:
try \ { \ x; \ } \ catch (...) \ { \ TEST_ERROR("Exception thrown: " #x); \ }
| #define TEST_REPORT_AUX | ( | x, | |||
| line, | |||||
| file | ) | report_failure(x, line, file) |
| void report_failure | ( | char const * | str, | |
| char const * | file, | |||
| int | line | |||
| ) |
1.5.6