#include <boost/test/unit_test.hpp>
#include <websocketpp/error.hpp>
Go to the source code of this file.
◆ BOOST_TEST_MODULE
#define BOOST_TEST_MODULE error |
◆ BOOST_AUTO_TEST_CASE()
BOOST_AUTO_TEST_CASE |
( |
constructing_exceptions | | ) |
|
Definition at line 33 of file error.cpp.
33 {
36
41
42 BOOST_CHECK_EQUAL(b.what(),"foo");
43 BOOST_CHECK_EQUAL(b.code(),general_ec);
44
45 BOOST_CHECK_EQUAL(c.what(),"foo");
46 BOOST_CHECK_EQUAL(c.code(),test_ec);
47
48 BOOST_CHECK_EQUAL(
d.what(),
"Generic error");
49 BOOST_CHECK_EQUAL(
d.code(),general_ec);
50
51 BOOST_CHECK_EQUAL(e.what(),"Test Error");
52 BOOST_CHECK_EQUAL(e.code(),test_ec);
53}
@ general
Catch-all library error.
@ test
Unit testing utility error code.
lib::error_code make_error_code(error::value e)