|
|
@ -1,15 +1,14 @@
|
|
|
|
#include <cstring>
|
|
|
|
#include <string>
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
|
|
|
|
|
|
|
|
#include "wsfs/jsonrpc/response.h"
|
|
|
|
#include "wsfs/jsonrpc/response.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void wsfs_response_parse_str(
|
|
|
|
static void wsfs_response_parse_str(
|
|
|
|
char const * buffer,
|
|
|
|
std::string const & buffer,
|
|
|
|
struct wsfs_jsonrpc_response * response)
|
|
|
|
struct wsfs_jsonrpc_response * response)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
size_t length = strlen(buffer);
|
|
|
|
wsfs_jsonrpc_response_init(response, buffer.c_str(), buffer.size());
|
|
|
|
wsfs_jsonrpc_response_init(response, buffer, length);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TEST(response_parser, test)
|
|
|
|
TEST(response_parser, test)
|
|
|
|