mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-05 13:49:21 +00:00
d3f4d18164
Enforce the nesting bound in one parse, capping allocation by depth, not input size.
31 lines
632 B
C++
31 lines
632 B
C++
#include "test/helpers/test_fixture.h"
|
|
#include "test/helpers/test_main_thread.h"
|
|
|
|
#include "rpc/command_map.h"
|
|
#include "rpc/jsonrpc.h"
|
|
|
|
class TestJsonrpc : public test_fixture {
|
|
CPPUNIT_TEST_SUITE(TestJsonrpc);
|
|
|
|
CPPUNIT_TEST(test_basics);
|
|
CPPUNIT_TEST(test_response_size_limit);
|
|
CPPUNIT_TEST(test_depth_limit);
|
|
CPPUNIT_TEST(test_size_limit);
|
|
|
|
CPPUNIT_TEST_SUITE_END();
|
|
|
|
public:
|
|
void setUp();
|
|
void tearDown();
|
|
|
|
void test_basics();
|
|
void test_response_size_limit();
|
|
void test_depth_limit();
|
|
void test_size_limit();
|
|
|
|
private:
|
|
std::unique_ptr<TestMainThread> m_test_main_thread;
|
|
|
|
rpc::JsonRpc m_jsonrpc;
|
|
};
|