Classes | Macros | Functions | Variables
test_dispatch.cpp File Reference
#include "xmlrpcpp/XmlRpcDispatch.h"
#include "xmlrpcpp/XmlRpcSource.h"
#include "xmlrpcpp/XmlRpcSocket.h"
#include "mock_socket.h"
#include <fcntl.h>
#include <netinet/in.h>
#include <poll.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#include <time.h>
#include <errno.h>
#include <iostream>
#include <functional>
#include <gtest/gtest.h>
Include dependency graph for test_dispatch.cpp:

Go to the source code of this file.

Classes

class  MockSource
 
class  MockSourceTest
 

Macros

#define EXPECT_CLOSE_CALLS(n)
 
#define EXPECT_EVENT(event)
 
#define EXPECT_EVENTS(n)
 

Functions

int __wrap_poll (struct pollfd *fds, nfds_t nfds, int timeout)
 
void Expect_poll (std::vector< pollfd > fds, int timeout, int _errno, int ret)
 
int main (int argc, char **argv)
 
int mock_poll (struct pollfd *fds, nfds_t nfds, int timeout)
 
 TEST_F (MockSourceTest, ReadEvent)
 
 TEST_F (MockSourceTest, WriteEvent)
 
 TEST_F (MockSourceTest, NonWriteable)
 
 TEST_F (MockSourceTest, WriteClose)
 
 TEST_F (MockSourceTest, Exception)
 
 TEST_F (MockSourceTest, LargeFd)
 

Variables

int(* fake_poll )(struct pollfd *, nfds_t, int)=0
 
int poll_calls = 0
 
int poll_errno = 0
 
std::vector< pollfd > poll_fds
 
int poll_ret = 0
 
int poll_timeout = 0
 

Macro Definition Documentation

#define EXPECT_CLOSE_CALLS (   n)
Value:
do { \
EXPECT_EQ(m.close_calls, n); \
m.close_calls = 0; \
} while (0)

Definition at line 139 of file test_dispatch.cpp.

#define EXPECT_EVENT (   event)
Value:
do { \
EXPECT_EQ(m.last_event, event); \
EXPECT_EQ(m.handleEvent_calls, 1); \
m.handleEvent_calls = 0; \
} while (0)

Definition at line 151 of file test_dispatch.cpp.

#define EXPECT_EVENTS (   n)
Value:
do { \
EXPECT_EQ(m.handleEvent_calls, n); \
m.handleEvent_calls = 0; \
} while (0)

Definition at line 145 of file test_dispatch.cpp.

Function Documentation

int __wrap_poll ( struct pollfd *  fds,
nfds_t  nfds,
int  timeout 
)

Definition at line 51 of file test_dispatch.cpp.

void Expect_poll ( std::vector< pollfd >  fds,
int  timeout,
int  _errno,
int  ret 
)

Definition at line 100 of file test_dispatch.cpp.

int main ( int  argc,
char **  argv 
)

Definition at line 340 of file test_dispatch.cpp.

int mock_poll ( struct pollfd *  fds,
nfds_t  nfds,
int  timeout 
)

Definition at line 66 of file test_dispatch.cpp.

TEST_F ( MockSourceTest  ,
ReadEvent   
)

Definition at line 211 of file test_dispatch.cpp.

TEST_F ( MockSourceTest  ,
WriteEvent   
)

Definition at line 234 of file test_dispatch.cpp.

TEST_F ( MockSourceTest  ,
NonWriteable   
)

Definition at line 259 of file test_dispatch.cpp.

TEST_F ( MockSourceTest  ,
WriteClose   
)

Definition at line 274 of file test_dispatch.cpp.

TEST_F ( MockSourceTest  ,
Exception   
)

Definition at line 300 of file test_dispatch.cpp.

TEST_F ( MockSourceTest  ,
LargeFd   
)

Definition at line 323 of file test_dispatch.cpp.

Variable Documentation

int(* fake_poll) (struct pollfd *, nfds_t, int)=0

Definition at line 49 of file test_dispatch.cpp.

int poll_calls = 0

Definition at line 61 of file test_dispatch.cpp.

int poll_errno = 0

Definition at line 63 of file test_dispatch.cpp.

std::vector<pollfd> poll_fds

Definition at line 65 of file test_dispatch.cpp.

int poll_ret = 0

Definition at line 62 of file test_dispatch.cpp.

int poll_timeout = 0

Definition at line 64 of file test_dispatch.cpp.



xmlrpcpp
Author(s): Chris Morley, Konstantin Pilipchuk, Morgan Quigley, Austin Hendrix
autogenerated on Sun Feb 3 2019 03:29:51