28#define BOOST_TEST_MODULE error
29#include <boost/test/unit_test.hpp>
42 BOOST_CHECK_EQUAL(b.
what(),
"foo");
43 BOOST_CHECK_EQUAL(b.
code(),general_ec);
45 BOOST_CHECK_EQUAL(c.
what(),
"foo");
46 BOOST_CHECK_EQUAL(c.
code(),test_ec);
48 BOOST_CHECK_EQUAL(
d.what(),
"Generic error");
49 BOOST_CHECK_EQUAL(
d.code(),general_ec);
51 BOOST_CHECK_EQUAL(e.
what(),
"Test Error");
52 BOOST_CHECK_EQUAL(e.
code(),test_ec);
lib::error_code code() const
virtual char const * what() const
BOOST_AUTO_TEST_CASE(constructing_exceptions)
@ general
Catch-all library error.
@ test
Unit testing utility error code.
lib::error_code make_error_code(error::value e)