Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
error.cpp File Reference
#include <boost/test/unit_test.hpp>
#include <websocketpp/error.hpp>
Include dependency graph for error.cpp:

Go to the source code of this file.

Macros

#define BOOST_TEST_MODULE   error
 

Functions

 BOOST_AUTO_TEST_CASE (constructing_exceptions)
 

Macro Definition Documentation

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   error

Definition at line 28 of file error.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE()

BOOST_AUTO_TEST_CASE ( constructing_exceptions )

Definition at line 33 of file error.cpp.

33 {
34 websocketpp::lib::error_code test_ec = websocketpp::error::make_error_code(websocketpp::error::test);
35 websocketpp::lib::error_code general_ec = websocketpp::error::make_error_code(websocketpp::error::general);
36
38 websocketpp::exception c("foo",test_ec);
40 websocketpp::exception e("",test_ec);
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.
Definition error.hpp:47
@ test
Unit testing utility error code.
Definition error.hpp:96
lib::error_code make_error_code(error::value e)
Definition error.hpp:235
CK_ULONG d
Here is the call graph for this function: