From 48018bd6e63ba7282e8ba92cb3d0b8bc175dd9c2 Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Tue, 26 Aug 2014 11:59:41 +0200 Subject: [PATCH] Set default tab size to 2 --- JsonGenerator/IndentedPrint.h | 2 +- .../PrettyPrint_Array_Tests.cpp | 26 +++++++++---------- .../PrettyPrint_Object_Tests.cpp | 22 ++++++++-------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/JsonGenerator/IndentedPrint.h b/JsonGenerator/IndentedPrint.h index e1877b5e..9f507228 100644 --- a/JsonGenerator/IndentedPrint.h +++ b/JsonGenerator/IndentedPrint.h @@ -19,7 +19,7 @@ namespace ArduinoJson : sink(p) { level = 0; - tabSize = 1; + tabSize = 2; isNewLine = true; } diff --git a/JsonGeneratorTests/PrettyPrint_Array_Tests.cpp b/JsonGeneratorTests/PrettyPrint_Array_Tests.cpp index f50ca461..82d1760a 100644 --- a/JsonGeneratorTests/PrettyPrint_Array_Tests.cpp +++ b/JsonGeneratorTests/PrettyPrint_Array_Tests.cpp @@ -31,7 +31,7 @@ namespace JsonGeneratorTests whenInputIs("[1]"); outputMustBe( "[\r\n" - " 1\r\n" + " 1\r\n" "]"); } @@ -40,8 +40,8 @@ namespace JsonGeneratorTests whenInputIs("[1,2]"); outputMustBe( "[\r\n" - " 1,\r\n" - " 2\r\n" + " 1,\r\n" + " 2\r\n" "]"); } @@ -50,8 +50,8 @@ namespace JsonGeneratorTests whenInputIs("[[],[]]"); outputMustBe( "[\r\n" - " [],\r\n" - " []\r\n" + " [],\r\n" + " []\r\n" "]"); } @@ -60,14 +60,14 @@ namespace JsonGeneratorTests whenInputIs("[[1,2],[3,4]]"); outputMustBe( "[\r\n" - " [\r\n" - " 1,\r\n" - " 2\r\n" - " ],\r\n" - " [\r\n" - " 3,\r\n" - " 4\r\n" - " ]\r\n" + " [\r\n" + " 1,\r\n" + " 2\r\n" + " ],\r\n" + " [\r\n" + " 3,\r\n" + " 4\r\n" + " ]\r\n" "]"); } diff --git a/JsonGeneratorTests/PrettyPrint_Object_Tests.cpp b/JsonGeneratorTests/PrettyPrint_Object_Tests.cpp index 7e368ab7..99c96cb9 100644 --- a/JsonGeneratorTests/PrettyPrint_Object_Tests.cpp +++ b/JsonGeneratorTests/PrettyPrint_Object_Tests.cpp @@ -31,7 +31,7 @@ namespace JsonGeneratorTests whenInputIs("{\"key\":\"value\"}"); outputMustBe( "{\r\n" - " \"key\": \"value\"\r\n" + " \"key\": \"value\"\r\n" "}"); } @@ -40,8 +40,8 @@ namespace JsonGeneratorTests whenInputIs("{\"key1\":\"value1\",\"key2\":\"value2\"}"); outputMustBe( "{\r\n" - " \"key1\": \"value1\",\r\n" - " \"key2\": \"value2\"\r\n" + " \"key1\": \"value1\",\r\n" + " \"key2\": \"value2\"\r\n" "}"); } @@ -50,8 +50,8 @@ namespace JsonGeneratorTests whenInputIs("{\"key1\":{},\"key2\":{}}"); outputMustBe( "{\r\n" - " \"key1\": {},\r\n" - " \"key2\": {}\r\n" + " \"key1\": {},\r\n" + " \"key2\": {}\r\n" "}"); } @@ -60,12 +60,12 @@ namespace JsonGeneratorTests whenInputIs("{\"key1\":{\"a\":1},\"key2\":{\"b\":2}}"); outputMustBe( "{\r\n" - " \"key1\": {\r\n" - " \"a\": 1\r\n" - " },\r\n" - " \"key2\": {\r\n" - " \"b\": 2\r\n" - " }\r\n" + " \"key1\": {\r\n" + " \"a\": 1\r\n" + " },\r\n" + " \"key2\": {\r\n" + " \"b\": 2\r\n" + " }\r\n" "}"); }