26 #include <gtest/gtest.h> 34 virtual void log(
int level,
const char* msg) {
55 for (
int i = 1; i < 6; i++) {
62 for (
int i = 1; i < 5; i++) {
65 for (
int j = 1; j <= i; j++) {
68 EXPECT_EQ(
"Hello1", fakelog.
last_msg);
81 for (
int i = 1; i < 5; i++) {
84 EXPECT_EQ(
"Hello3", fakelog.
last_msg);
93 EXPECT_EQ(
"Hello 42", fakelog.
last_msg);
100 virtual void error(
const char* msg) {
116 EXPECT_EQ(
"Error!", errors.
last_msg);
121 EXPECT_EQ(
"408: I'm a teapot", errors.
last_msg);
124 int main(
int argc,
char **argv)
126 ::testing::InitGoogleTest(&argc, argv);
127 return RUN_ALL_TESTS();
static XmlRpcLogHandler * getLogHandler()
Returns a pointer to the currently installed message reporting object.
static void setLogHandler(XmlRpcLogHandler *lh)
Specifies the message handler.
static int getVerbosity()
Returns the level of verbosity of informational messages. 0 is no output, 5 is very verbose...
virtual void log(int level, const char *msg)
Output a message. Custom error handlers should define this method.
virtual void error(const char *msg)
Report an error. Custom error handlers should define this method.
static XmlRpcErrorHandler * getErrorHandler()
Returns a pointer to the currently installed error handling object.
static void error(const char *fmt,...)
Dump error messages somewhere.
TEST(xmlrpcvalue_base64, empty_string)
XMLRPCPP_DECL int getVerbosity()
Returns log message verbosity. This is short for XmlRpcLogHandler::getVerbosity() ...
XMLRPCPP_DECL void setVerbosity(int level)
Sets log message verbosity. This is short for XmlRpcLogHandler::setVerbosity(level) ...
An interface allowing custom handling of informational message reporting.
static void setErrorHandler(XmlRpcErrorHandler *eh)
Specifies the error handler.
int main(int argc, char **argv)
static void log(int level, const char *fmt,...)
Dump messages somewhere.
An interface allowing custom handling of error message reporting.