#include <boost/test/unit_test.hpp>
#include <iostream>
#include <string>
#include <websocketpp/processors/hybi00.hpp>
#include <websocketpp/http/request.hpp>
#include <websocketpp/http/response.hpp>
#include <websocketpp/message_buffer/message.hpp>
#include <websocketpp/message_buffer/alloc.hpp>
Go to the source code of this file.
Classes | |
struct | stub_config |
struct | processor_setup |
Macros | |
#define | BOOST_TEST_MODULE hybi_00_processor |
Typedefs | |
typedef stub_config::message_type::ptr | message_ptr |
Functions | |
BOOST_AUTO_TEST_CASE (exact_match) | |
BOOST_AUTO_TEST_CASE (non_get_method) | |
BOOST_AUTO_TEST_CASE (old_http_version) | |
BOOST_AUTO_TEST_CASE (missing_handshake_key1) | |
BOOST_AUTO_TEST_CASE (missing_handshake_key2) | |
BOOST_AUTO_TEST_CASE (bad_host) | |
BOOST_AUTO_TEST_CASE (extract_subprotocols) | |
BOOST_AUTO_TEST_CASE (prepare_data_frame_null) | |
BOOST_AUTO_TEST_CASE (prepare_data_frame) | |
BOOST_AUTO_TEST_CASE (empty_consume) | |
BOOST_AUTO_TEST_CASE (empty_frame) | |
BOOST_AUTO_TEST_CASE (short_frame) | |
#define BOOST_TEST_MODULE hybi_00_processor |
Definition at line 28 of file hybi00.cpp.
typedef stub_config::message_type::ptr message_ptr |
Definition at line 64 of file hybi00.cpp.
BOOST_AUTO_TEST_CASE | ( | exact_match | ) |
Definition at line 66 of file hybi00.cpp.
References processor_setup::ec, websocketpp::processor::hybi00< config >::get_uri(), websocketpp::processor::hybi00< config >::get_version(), websocketpp::processor::get_websocket_version(), websocketpp::processor::is_websocket_handshake(), processor_setup::p, websocketpp::processor::hybi00< config >::process_handshake(), processor_setup::req, processor_setup::res, websocketpp::uri_default_port, and websocketpp::processor::hybi00< config >::validate_handshake().
BOOST_AUTO_TEST_CASE | ( | non_get_method | ) |
Definition at line 98 of file hybi00.cpp.
References websocketpp::processor::hybi00< config >::get_version(), websocketpp::processor::get_websocket_version(), websocketpp::processor::error::invalid_http_method, websocketpp::processor::is_websocket_handshake(), processor_setup::p, processor_setup::req, and websocketpp::processor::hybi00< config >::validate_handshake().
BOOST_AUTO_TEST_CASE | ( | old_http_version | ) |
Definition at line 111 of file hybi00.cpp.
References websocketpp::processor::hybi00< config >::get_version(), websocketpp::processor::get_websocket_version(), websocketpp::processor::error::invalid_http_version, websocketpp::processor::is_websocket_handshake(), processor_setup::p, processor_setup::req, and websocketpp::processor::hybi00< config >::validate_handshake().
BOOST_AUTO_TEST_CASE | ( | missing_handshake_key1 | ) |
Definition at line 124 of file hybi00.cpp.
References websocketpp::processor::hybi00< config >::get_version(), websocketpp::processor::get_websocket_version(), websocketpp::processor::is_websocket_handshake(), websocketpp::processor::error::missing_required_header, processor_setup::p, processor_setup::req, and websocketpp::processor::hybi00< config >::validate_handshake().
BOOST_AUTO_TEST_CASE | ( | missing_handshake_key2 | ) |
Definition at line 137 of file hybi00.cpp.
References websocketpp::processor::hybi00< config >::get_version(), websocketpp::processor::get_websocket_version(), websocketpp::processor::is_websocket_handshake(), websocketpp::processor::error::missing_required_header, processor_setup::p, processor_setup::req, and websocketpp::processor::hybi00< config >::validate_handshake().
BOOST_AUTO_TEST_CASE | ( | bad_host | ) |
Definition at line 150 of file hybi00.cpp.
References websocketpp::processor::hybi00< config >::get_uri(), websocketpp::processor::hybi00< config >::get_version(), websocketpp::processor::get_websocket_version(), websocketpp::processor::is_websocket_handshake(), processor_setup::p, processor_setup::req, and websocketpp::processor::hybi00< config >::validate_handshake().
BOOST_AUTO_TEST_CASE | ( | extract_subprotocols | ) |
Definition at line 166 of file hybi00.cpp.
References websocketpp::processor::hybi00< config >::extract_subprotocols(), processor_setup::p, and processor_setup::req.
BOOST_AUTO_TEST_CASE | ( | prepare_data_frame_null | ) |
Definition at line 175 of file hybi00.cpp.
References processor_setup::ec, websocketpp::close::status::invalid(), websocketpp::processor::error::invalid_arguments, websocketpp::processor::error::invalid_opcode, processor_setup::msg_manager, processor_setup::p, and websocketpp::processor::hybi00< config >::prepare_data_frame().
BOOST_AUTO_TEST_CASE | ( | prepare_data_frame | ) |
Definition at line 216 of file hybi00.cpp.
References processor_setup::ec, processor_setup::msg_manager, processor_setup::p, websocketpp::processor::hybi00< config >::prepare_data_frame(), and websocketpp::frame::opcode::text.
BOOST_AUTO_TEST_CASE | ( | empty_consume | ) |
Definition at line 236 of file hybi00.cpp.
References websocketpp::processor::hybi00< config >::consume(), processor_setup::ec, processor_setup::p, and websocketpp::processor::hybi00< config >::ready().
BOOST_AUTO_TEST_CASE | ( | empty_frame | ) |
Definition at line 248 of file hybi00.cpp.
References websocketpp::processor::hybi00< config >::consume(), processor_setup::ec, websocketpp::processor::hybi00< config >::get_message(), processor_setup::p, and websocketpp::processor::hybi00< config >::ready().
BOOST_AUTO_TEST_CASE | ( | short_frame | ) |
Definition at line 262 of file hybi00.cpp.
References websocketpp::processor::hybi00< config >::consume(), processor_setup::ec, websocketpp::processor::hybi00< config >::get_message(), processor_setup::p, and websocketpp::processor::hybi00< config >::ready().