From 81a7ff5db52f56503dbf1a21e3ad096610e86e1a Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 2 Feb 2015 23:02:26 +1100 Subject: [PATCH] json: use raw string literals for test data --- test/json_types.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/test/json_types.cpp b/test/json_types.cpp index 320f03ee..d5e3c616 100644 --- a/test/json_types.cpp +++ b/test/json_types.cpp @@ -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 ptr = json::tree::parse (TEST_STRING); CHECK (ptr->is_object ());