Go to the documentation of this file.
30 #include <sys/types.h>
32 # include <sys/socket.h>
34 # include <winsock2.h>
40 #include <gtest/gtest.h>
52 ASSERT_TRUE(c.
execute(
"Hello", noArgs, result));
56 EXPECT_EQ(result, hello);
68 for (
int i = 0; i < 30; i++)
80 EXPECT_EQ(result, hello);
89 hello.hello_mutex.lock();
95 for (
int i = 0; i < 100; i++)
105 hello.hello_mutex.unlock();
111 EXPECT_EQ(result, hello);
120 hello.hello_mutex.lock();
129 hello.hello_mutex.unlock();
141 server_thread.join();
151 for (
int i = 0; i < 100; i++)
163 EXPECT_EQ(-1, c.
getfd());
175 server_thread.join();
178 shutdown(
s.
getfd(), SHUT_RD);
180 shutdown(
s.
getfd(), SD_RECEIVE);
185 ASSERT_FALSE(c.
execute(
"Hello", noArgs, result));
188 EXPECT_EQ(result, hello);
191 int main(
int argc,
char **argv)
193 ::testing::InitGoogleTest(&argc, argv);
194 return RUN_ALL_TESTS();
XMLRPCPP_DECL void setVerbosity(int level)
Sets log message verbosity. This is short for XmlRpcLogHandler::setVerbosity(level)
bool executeNonBlock(const char *method, XmlRpcValue const ¶ms)
bool execute(const char *method, XmlRpcValue const ¶ms, XmlRpcValue &result)
A class to send XML RPC requests to a server and return the results.
int main(int argc, char **argv)
bool executeCheckDone(XmlRpcValue &result)
bool isFault() const
Returns true if the result of the last execute() was a fault response.
int getfd() const
Return the file descriptor being monitored.
void shutdown()
Close all connections with clients and the socket file descriptor.
TEST_F(XmlRpcTest, Hello)
RPC method arguments and results are represented by Values.
xmlrpcpp
Author(s): Chris Morley, Konstantin Pilipchuk, Morgan Quigley, Austin Hendrix, Dirk Thomas
, Jacob Perron
autogenerated on Sat Sep 14 2024 02:59:32