From 3805e36b5a276ba622734dffd502e0abca7acd3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Tue, 30 Jan 2024 19:29:05 +0100 Subject: [PATCH] Use spaces for indentation --- nano/core_test/object_stream.cpp | 124 +++++++++++++++---------------- nano/lib/object_stream.hpp | 2 +- 2 files changed, 63 insertions(+), 63 deletions(-) diff --git a/nano/core_test/object_stream.cpp b/nano/core_test/object_stream.cpp index 59c09db3bc..ead8bad719 100644 --- a/nano/core_test/object_stream.cpp +++ b/nano/core_test/object_stream.cpp @@ -212,10 +212,10 @@ TEST (object_stream, object_writer_basic) auto expected = trim (R"( object_field: { - field1: "value1", - field2: "value2", - field3: true, - field4: 1234 + field1: "value1", + field2: "value2", + field3: true, + field4: 1234 } )"); @@ -243,15 +243,15 @@ TEST (object_stream, object_writer_nested) auto expected = trim (R"( object_field: { - field1: "value1", - nested_object: { - nested_field1: "nested_value1", - nested_field2: false, - nested_field3: -1234 - }, - field2: "value2", - field3: true, - field4: 1234 + field1: "value1", + nested_object: { + nested_field1: "nested_value1", + nested_field2: false, + nested_field3: -1234 + }, + field2: "value2", + field3: true, + field4: 1234 } )"); @@ -269,9 +269,9 @@ TEST (object_stream, array_writer_basic) auto expected = trim (R"( array_field: [ - 0, - 1, - 2 + 0, + 1, + 2 ] )"); @@ -304,8 +304,8 @@ TEST (object_stream, object_basic) auto expected = trim (R"( test_object: { - uint256_union_field: "0000000000000000000000000000000000000000000000000000000000000000", - block_hash: "0000000000000000000000000000000000000000000000000000000000000000" + uint256_union_field: "0000000000000000000000000000000000000000000000000000000000000000", + block_hash: "0000000000000000000000000000000000000000000000000000000000000000" } )"); @@ -328,18 +328,18 @@ TEST (object_stream, array_writer_objects) auto expected = trim (R"( array_field: [ - { - uint256_union_field: "0000000000000000000000000000000000000000000000000000000000000000", - block_hash: "0000000000000000000000000000000000000000000000000000000000000000" - }, - { - uint256_union_field: "0000000000000000000000000000000000000000000000000000000000000000", - block_hash: "0000000000000000000000000000000000000000000000000000000000000001" - }, - { - uint256_union_field: "0000000000000000000000000000000000000000000000000000000000000000", - block_hash: "0000000000000000000000000000000000000000000000000000000000000002" - } + { + uint256_union_field: "0000000000000000000000000000000000000000000000000000000000000000", + block_hash: "0000000000000000000000000000000000000000000000000000000000000000" + }, + { + uint256_union_field: "0000000000000000000000000000000000000000000000000000000000000000", + block_hash: "0000000000000000000000000000000000000000000000000000000000000001" + }, + { + uint256_union_field: "0000000000000000000000000000000000000000000000000000000000000000", + block_hash: "0000000000000000000000000000000000000000000000000000000000000002" + } ] )"); @@ -370,9 +370,9 @@ TEST (object_stream, object_array_basic) auto expected = trim (R"( test_object_array: [ - 1, - 2, - 3 + 1, + 2, + 3 ] )"); @@ -410,17 +410,17 @@ TEST (object_stream, object_nested) auto expected = trim (R"( test_object: { - uint256_union_field: "0000000000000000000000000000000000000000000000000000000000000000", - block_hash: "0000000000000000000000000000000000000000000000000000000000000000", - nested_object: { - uint256_union_field: "0000000000000000000000000000000000000000000000000000000000000000", - block_hash: "0000000000000000000000000000000000000000000000000000000000000000" - }, - nested_array_object: [ - 1, - 2, - 3 - ] + uint256_union_field: "0000000000000000000000000000000000000000000000000000000000000000", + block_hash: "0000000000000000000000000000000000000000000000000000000000000000", + nested_object: { + uint256_union_field: "0000000000000000000000000000000000000000000000000000000000000000", + block_hash: "0000000000000000000000000000000000000000000000000000000000000000" + }, + nested_array_object: [ + 1, + 2, + 3 + ] } )"); @@ -455,18 +455,18 @@ TEST (object_stream, builtin_array) auto expected = trim (R"( array_field: [ - { - hash: "0000000000000000000000000000000000000000000000000000000000000001", - value: 1 - }, - { - hash: "0000000000000000000000000000000000000000000000000000000000000002", - value: 2 - }, - { - hash: "0000000000000000000000000000000000000000000000000000000000000003", - value: 3 - } + { + hash: "0000000000000000000000000000000000000000000000000000000000000001", + value: 1 + }, + { + hash: "0000000000000000000000000000000000000000000000000000000000000002", + value: 2 + }, + { + hash: "0000000000000000000000000000000000000000000000000000000000000003", + value: 3 + } ] )"); @@ -501,8 +501,8 @@ TEST (object_stream, ostream_adapter) auto expected = trim (R"( { - uint256_union_field: "0000000000000000000000000000000000000000000000000000000000000000", - block_hash: "0000000000000000000000000000000000000000000000000000000000000000" + uint256_union_field: "0000000000000000000000000000000000000000000000000000000000000000", + block_hash: "0000000000000000000000000000000000000000000000000000000000000000" } )"); @@ -518,8 +518,8 @@ TEST (object_stream, fmt_adapter) auto expected = trim (R"( { - uint256_union_field: "0000000000000000000000000000000000000000000000000000000000000000", - block_hash: "0000000000000000000000000000000000000000000000000000000000000000" + uint256_union_field: "0000000000000000000000000000000000000000000000000000000000000000", + block_hash: "0000000000000000000000000000000000000000000000000000000000000000" } )"); @@ -536,8 +536,8 @@ TEST (object_stream, to_string) auto expected = trim (R"( { - uint256_union_field: "0000000000000000000000000000000000000000000000000000000000000000", - block_hash: "0000000000000000000000000000000000000000000000000000000000000000" + uint256_union_field: "0000000000000000000000000000000000000000000000000000000000000000", + block_hash: "0000000000000000000000000000000000000000000000000000000000000000" } )"); diff --git a/nano/lib/object_stream.hpp b/nano/lib/object_stream.hpp index 02b20bf44b..40c638df91 100644 --- a/nano/lib/object_stream.hpp +++ b/nano/lib/object_stream.hpp @@ -37,7 +37,7 @@ struct object_stream_config std::string false_value{ "false" }; std::string null_value{ "null" }; - std::string indent{ "\t" }; + std::string indent{ " " }; std::string newline{ "\n" }; /** Number of decimal places to show for `float` and `double` */