json: use raw string literals for test data
This commit is contained in:
parent
f3f969c8cb
commit
81a7ff5db5
@ -8,21 +8,21 @@
|
|||||||
|
|
||||||
int
|
int
|
||||||
main (int, char**) {
|
main (int, char**) {
|
||||||
static const char TEST_STRING[] =
|
static const char TEST_STRING[] = R"_(
|
||||||
"{"
|
{
|
||||||
" \"string\" : \"brad\","
|
"string":"brad",
|
||||||
" \"integer\": 1, "
|
"integer":1,
|
||||||
" \"null\": null, "
|
"null":null,
|
||||||
" \"false\": false, "
|
"false":false,
|
||||||
" \"true\": true, "
|
"true":true,
|
||||||
" \"double\": 3.14, "
|
"double":3.14,
|
||||||
" \"object\": { "
|
"object":{
|
||||||
" \"test\": \"test\" "
|
"test": "test"
|
||||||
" }, "
|
},
|
||||||
" \"array\": [ "
|
"array":[
|
||||||
" 1, 2, 3, 4 "
|
1, 2, 3, 4
|
||||||
" ]"
|
]
|
||||||
"}";
|
})_";
|
||||||
|
|
||||||
std::unique_ptr<json::tree::node> ptr = json::tree::parse (TEST_STRING);
|
std::unique_ptr<json::tree::node> ptr = json::tree::parse (TEST_STRING);
|
||||||
CHECK (ptr->is_object ());
|
CHECK (ptr->is_object ());
|
||||||
|
Loading…
Reference in New Issue
Block a user