| 1 | #ifndef BOOST_PROGRAM_OPTIONS_MINITEST |
| 2 | #define BOOST_PROGRAM_OPTIONS_MINITEST |
| 3 | |
| 4 | #include <assert.h> |
| 5 | #include <iostream> |
| 6 | #include <stdlib.h> |
| 7 | |
| 8 | #define BOOST_REQUIRE(b) assert(b) |
| 9 | #define BOOST_CHECK(b) assert(b) |
| 10 | #define BOOST_CHECK_EQUAL(a, b) assert(a == b) |
| 11 | #define BOOST_ERROR(description) std::cerr << description; std::cerr << "\n"; abort(); |
| 12 | #define BOOST_CHECK_THROW(expression, exception) \ |
| 13 | try \ |
| 14 | { \ |
| 15 | expression; \ |
| 16 | BOOST_ERROR("expected exception not thrown");\ |
| 17 | throw 10; \ |
| 18 | } \ |
| 19 | catch(exception &) \ |
| 20 | { \ |
| 21 | } |
| 22 | |
| 23 | |
| 24 | |
| 25 | #endif |
| 26 | |