zmqpp 4.1.2
C++ bindings for 0mq (libzmq)
Loading...
Searching...
No Matches
test_socket_options.cpp File Reference
#include <boost/test/unit_test.hpp>
#include <boost/lexical_cast.hpp>
#include "zmqpp/context.hpp"
#include "zmqpp/socket.hpp"
Include dependency graph for test_socket_options.cpp:

Macros

#define STRINGIFY(x)
 
#define CHECK_SET(socket, type, option)
 
#define CHECK_SET_POSITIVE(socket, type, option)
 
#define CHECK_GET(socket, type, option)
 
#define CHECK_NOSET(socket, option)
 
#define CHECK_NOGET(socket, option)
 

Functions

template<typename CheckType , typename WantedType >
void try_set (zmqpp::socket &socket, zmqpp::socket_option const &option, CheckType const &value, std::string const &option_name, std::string const &value_type)
 
template<typename CheckType , typename WantedType >
void try_get (zmqpp::socket const &socket, zmqpp::socket_option const &option, std::string const &option_name, std::string const &value_type)
 
template<typename Type >
void check_set (zmqpp::socket &socket, zmqpp::socket_option const &option, std::string const &option_name, bool positive_only)
 
template<typename Type >
void check_get (zmqpp::socket &socket, zmqpp::socket_option const &option, std::string const &option_name)
 
 BOOST_AUTO_TEST_CASE (set_socket_options)
 
 BOOST_AUTO_TEST_CASE (set_socket_options_tcp_only)
 
 BOOST_AUTO_TEST_CASE (set_socket_options_router_types)
 
 BOOST_AUTO_TEST_CASE (set_socket_options_request_types)
 
 BOOST_AUTO_TEST_CASE (get_socket_options)
 
 BOOST_AUTO_TEST_CASE (get_socket_options_tcp_only)
 
 BOOST_AUTO_TEST_CASE (use_fd_socket_option)
 

Macro Definition Documentation

◆ CHECK_GET

#define CHECK_GET ( socket,
type,
option )
Value:
check_get<type>(socket, zmqpp::socket_option::option, STRINGIFY(option))
void check_get(zmqpp::socket &socket, zmqpp::socket_option const &option, std::string const &option_name)
Definition test_socket_options.cpp:121
#define STRINGIFY(x)
Definition test_socket_options.cpp:23

◆ CHECK_NOGET

#define CHECK_NOGET ( socket,
option )
Value:
check_get<float>(socket, zmqpp::socket_option::option, STRINGIFY(option))

◆ CHECK_NOSET

#define CHECK_NOSET ( socket,
option )
Value:
check_set<float>(socket, zmqpp::socket_option::option, STRINGIFY(option), false)
void check_set(zmqpp::socket &socket, zmqpp::socket_option const &option, std::string const &option_name, bool positive_only)
Definition test_socket_options.cpp:72

◆ CHECK_SET

#define CHECK_SET ( socket,
type,
option )
Value:
check_set<type>(socket, zmqpp::socket_option::option, STRINGIFY(option), false)

◆ CHECK_SET_POSITIVE

#define CHECK_SET_POSITIVE ( socket,
type,
option )
Value:
check_set<type>(socket, zmqpp::socket_option::option, STRINGIFY(option), true)

◆ STRINGIFY

#define STRINGIFY ( x)
Value:
#x

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/7]

BOOST_AUTO_TEST_CASE ( get_socket_options )

◆ BOOST_AUTO_TEST_CASE() [2/7]

BOOST_AUTO_TEST_CASE ( get_socket_options_tcp_only )

◆ BOOST_AUTO_TEST_CASE() [3/7]

BOOST_AUTO_TEST_CASE ( set_socket_options )

◆ BOOST_AUTO_TEST_CASE() [4/7]

BOOST_AUTO_TEST_CASE ( set_socket_options_request_types )

◆ BOOST_AUTO_TEST_CASE() [5/7]

BOOST_AUTO_TEST_CASE ( set_socket_options_router_types )

◆ BOOST_AUTO_TEST_CASE() [6/7]

BOOST_AUTO_TEST_CASE ( set_socket_options_tcp_only )

◆ BOOST_AUTO_TEST_CASE() [7/7]

BOOST_AUTO_TEST_CASE ( use_fd_socket_option )

◆ check_get()

template<typename Type >
void check_get ( zmqpp::socket & socket,
zmqpp::socket_option const & option,
std::string const & option_name )

◆ check_set()

template<typename Type >
void check_set ( zmqpp::socket & socket,
zmqpp::socket_option const & option,
std::string const & option_name,
bool positive_only )

◆ try_get()

template<typename CheckType , typename WantedType >
void try_get ( zmqpp::socket const & socket,
zmqpp::socket_option const & option,
std::string const & option_name,
std::string const & value_type )

◆ try_set()

template<typename CheckType , typename WantedType >
void try_set ( zmqpp::socket & socket,
zmqpp::socket_option const & option,
CheckType const & value,
std::string const & option_name,
std::string const & value_type )