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