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

Go to the source code of this file.

Classes

struct  stub< con_msg_manager >
 

Macros

#define BOOST_TEST_MODULE   message_buffer_alloc
 

Functions

 BOOST_AUTO_TEST_CASE (basic_get_message)
 
 BOOST_AUTO_TEST_CASE (basic_get_manager)
 

Macro Definition Documentation

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   message_buffer_alloc

Definition at line 28 of file alloc.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( basic_get_manager )

Definition at line 79 of file alloc.cpp.

79 {
81 message_type;
83 con_msg_man_type;
85 <con_msg_man_type> endpoint_manager_type;
86
87 endpoint_manager_type em;
88 con_msg_man_type::ptr manager = em.get_manager();
89 message_type::ptr msg = manager->get_message(websocketpp::frame::opcode::TEXT,512);
90
91 BOOST_CHECK(msg);
92 BOOST_CHECK(msg->m_opcode == websocketpp::frame::opcode::TEXT);
93 BOOST_CHECK(msg->m_manager.lock() == manager);
94 BOOST_CHECK(msg->m_size == 512);
95}
con_msg_man_ptr get_manager() const
Get a pointer to a connection message manager.
Definition alloc.hpp:96
Definition alloc.cpp:37
Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( basic_get_message )

Definition at line 64 of file alloc.cpp.

64 {
66 message_type;
68 con_msg_man_type;
69
70 con_msg_man_type::ptr manager(new con_msg_man_type());
71 message_type::ptr msg = manager->get_message(websocketpp::frame::opcode::TEXT,512);
72
73 BOOST_CHECK(msg);
74 BOOST_CHECK(msg->m_opcode == websocketpp::frame::opcode::TEXT);
75 BOOST_CHECK(msg->m_manager.lock() == manager);
76 BOOST_CHECK(msg->m_size == 512);
77}