mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-14 05:06:16 +00:00
Allow using vendored tinyxml2 for XMLRPC
By default, builds will still not have XMLRPC enabled at all and the configure flag `--with-xmlrpc-tinyxml2` must be specified. If both xmlrpc-c and tinyxml2 are specified, xmlrpc-c takes precedence. Basic benchmarks indicate tinyxml2 is 2x faster for small requests/responses, and that only increases as response sizes get larger.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
|
||||
#include "rpc/command_map.h"
|
||||
#include "rpc/xmlrpc.h"
|
||||
|
||||
class XmlrpcTest : public CppUnit::TestFixture {
|
||||
CPPUNIT_TEST_SUITE(XmlrpcTest);
|
||||
CPPUNIT_TEST(test_basics);
|
||||
CPPUNIT_TEST(test_invalid_utf8);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
static const int cmd_size = 256;
|
||||
|
||||
void setUp();
|
||||
void tearDown() {}
|
||||
|
||||
void test_basics();
|
||||
void test_invalid_utf8();
|
||||
|
||||
private:
|
||||
rpc::XmlRpc m_xmlrpc;
|
||||
|
||||
rpc::CommandMap m_map;
|
||||
|
||||
rpc::command_base m_commands[cmd_size];
|
||||
rpc::command_base* m_commandItr;
|
||||
};
|
||||
Reference in New Issue
Block a user