forked from sdarwin/json
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatic_resource.cpp
More file actions
42 lines (34 loc) · 857 Bytes
/
Copy pathstatic_resource.cpp
File metadata and controls
42 lines (34 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// Copyright (c) 2020 Vinnie Falco ([email protected])
//
// 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"
BOOST_JSON_NS_BEGIN
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");
BOOST_JSON_NS_END