mirror of
https://github.com/boostorg/json.git
synced 2026-01-31 08:12:25 +00:00
46 lines
876 B
C++
46 lines
876 B
C++
//
|
|
// Copyright (c) 2020 Vinnie Falco (vinnie.falco@gmail.com)
|
|
//
|
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
//
|
|
// Official repository: https://github.com/cppalliance/json
|
|
//
|
|
|
|
// Test that header file is self-contained.
|
|
#include <boost/json/static_resource.hpp>
|
|
|
|
#include <boost/json/parse.hpp>
|
|
#include <boost/json/to_string.hpp>
|
|
|
|
#include "test_suite.hpp"
|
|
|
|
namespace boost {
|
|
namespace json {
|
|
|
|
class static_resource_test
|
|
{
|
|
public:
|
|
void
|
|
test()
|
|
{
|
|
char buf[1000];
|
|
static_resource mr(
|
|
buf, sizeof(buf));
|
|
BOOST_TEST(to_string(parse(
|
|
"[1,2,3]", &mr)) == "[1,2,3]");
|
|
}
|
|
|
|
void
|
|
run()
|
|
{
|
|
test();
|
|
}
|
|
};
|
|
|
|
TEST_SUITE(static_resource_test, "boost.json.static_resource");
|
|
|
|
} // json
|
|
} // boost
|
|
|