diff options
author | Vlad Yaroslavlev <vladon@vladon.com> | 2022-02-10 16:46:23 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:23 +0300 |
commit | 706b83ed7de5a473436620367af31fc0ceecde07 (patch) | |
tree | 103305d30dec77e8f6367753367f59b3cd68f9f1 /library/cpp/json | |
parent | 918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (diff) | |
download | ydb-706b83ed7de5a473436620367af31fc0ceecde07.tar.gz |
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/json')
-rw-r--r-- | library/cpp/json/domscheme_traits.h | 8 | ||||
-rw-r--r-- | library/cpp/json/easy_parse/json_easy_parser.h | 8 | ||||
-rw-r--r-- | library/cpp/json/easy_parse/json_easy_parser_impl.h | 6 | ||||
-rw-r--r-- | library/cpp/json/fast_sax/parser.rl6 | 2 | ||||
-rw-r--r-- | library/cpp/json/fuzzy_test/main.cpp | 2 | ||||
-rw-r--r-- | library/cpp/json/json_writer.h | 8 | ||||
-rw-r--r-- | library/cpp/json/ut/json_reader_fast_ut.cpp | 2 | ||||
-rw-r--r-- | library/cpp/json/ut/json_reader_ut.cpp | 18 | ||||
-rw-r--r-- | library/cpp/json/ut/json_writer_ut.cpp | 130 | ||||
-rw-r--r-- | library/cpp/json/writer/json.h | 10 | ||||
-rw-r--r-- | library/cpp/json/writer/json_ut.cpp | 12 | ||||
-rw-r--r-- | library/cpp/json/writer/json_value.cpp | 8 | ||||
-rw-r--r-- | library/cpp/json/writer/json_value.h | 2 | ||||
-rw-r--r-- | library/cpp/json/writer/json_value_ut.cpp | 8 | ||||
-rw-r--r-- | library/cpp/json/yson/json2yson.cpp | 2 | ||||
-rw-r--r-- | library/cpp/json/yson/json2yson_ut.cpp | 2 |
16 files changed, 114 insertions, 114 deletions
diff --git a/library/cpp/json/domscheme_traits.h b/library/cpp/json/domscheme_traits.h index a5a99cd8cf..91c3351b22 100644 --- a/library/cpp/json/domscheme_traits.h +++ b/library/cpp/json/domscheme_traits.h @@ -9,7 +9,7 @@ struct TJsonTraits { using TValue = NJson::TJsonValue; using TValueRef = TValue*; using TConstValueRef = const TValue*; - using TStringType = TStringBuf; + using TStringType = TStringBuf; // anyvalue defaults template <class T> @@ -104,7 +104,7 @@ struct TJsonTraits { return v->GetMap().size(); } - using TDictIterator = NJson::TJsonValue::TMapType::const_iterator; + using TDictIterator = NJson::TJsonValue::TMapType::const_iterator; static inline TDictIterator DictBegin(TConstValueRef v) { return v->GetMap().begin(); @@ -200,8 +200,8 @@ struct TJsonTraits { } // validation ops - static inline TVector<TString> GetKeys(TConstValueRef v) { - TVector<TString> res; + static inline TVector<TString> GetKeys(TConstValueRef v) { + TVector<TString> res; for (const auto& it : v->GetMap()) { res.push_back(it.first); } diff --git a/library/cpp/json/easy_parse/json_easy_parser.h b/library/cpp/json/easy_parse/json_easy_parser.h index 59d7791ab1..6a74f6c3d4 100644 --- a/library/cpp/json/easy_parse/json_easy_parser.h +++ b/library/cpp/json/easy_parse/json_easy_parser.h @@ -1,6 +1,6 @@ #pragma once -#include <util/generic/string.h> +#include <util/generic/string.h> #include <util/generic/vector.h> #include <util/stream/input.h> #include <util/stream/output.h> @@ -23,13 +23,13 @@ namespace NJson { */ class TJsonParser { - TString Prefix; + TString Prefix; struct TField { - TVector<TPathElem> Path; + TVector<TPathElem> Path; bool NonEmpty; }; - TVector<TField> Fields; + TVector<TField> Fields; friend class TRewriteJsonImpl; diff --git a/library/cpp/json/easy_parse/json_easy_parser_impl.h b/library/cpp/json/easy_parse/json_easy_parser_impl.h index ec55d838b3..491b684df7 100644 --- a/library/cpp/json/easy_parse/json_easy_parser_impl.h +++ b/library/cpp/json/easy_parse/json_easy_parser_impl.h @@ -10,10 +10,10 @@ namespace NJson { MAP_KEY }; } - template <class TStringType> + template <class TStringType> struct TPathElemImpl { NImpl::EType Type; - TStringType Key; + TStringType Key; int ArrayCounter; TPathElemImpl(NImpl::EType type) @@ -36,5 +36,5 @@ namespace NJson { } }; - typedef TPathElemImpl<TString> TPathElem; + typedef TPathElemImpl<TString> TPathElem; } diff --git a/library/cpp/json/fast_sax/parser.rl6 b/library/cpp/json/fast_sax/parser.rl6 index edb4e9ee1b..885f141c3d 100644 --- a/library/cpp/json/fast_sax/parser.rl6 +++ b/library/cpp/json/fast_sax/parser.rl6 @@ -58,7 +58,7 @@ struct TParserCtx { if (!token) { Hndl.OnError(off, reason); } else { - Hndl.OnError(off, TString::Join(reason, " at token: '", token, "'")); + Hndl.OnError(off, TString::Join(reason, " at token: '", token, "'")); } return false; diff --git a/library/cpp/json/fuzzy_test/main.cpp b/library/cpp/json/fuzzy_test/main.cpp index 29a53aac14..3f6dbc3117 100644 --- a/library/cpp/json/fuzzy_test/main.cpp +++ b/library/cpp/json/fuzzy_test/main.cpp @@ -4,7 +4,7 @@ #include <util/stream/str.h> extern "C" int LLVMFuzzerTestOneInput(const ui8* data, size_t size) { - const auto json = TString((const char*)data, size); + const auto json = TString((const char*)data, size); try { NJson::TJsonValue value; diff --git a/library/cpp/json/json_writer.h b/library/cpp/json/json_writer.h index c7f5c9499a..ecd4dcc671 100644 --- a/library/cpp/json/json_writer.h +++ b/library/cpp/json/json_writer.h @@ -8,7 +8,7 @@ #include <util/stream/output.h> #include <util/generic/hash.h> -#include <util/generic/maybe.h> +#include <util/generic/maybe.h> #include <util/generic/strbuf.h> namespace NJson { @@ -154,8 +154,8 @@ namespace NJson { void WriteOptional(const TStringBuf&, const TNothing&) { // nothing to do - } - + } + void WriteKey(const TStringBuf key) { Buf.WriteKey(key); } @@ -179,7 +179,7 @@ namespace NJson { NJsonWriter::TBufState State() const { return Buf.State(); } - + void Reset(const NJsonWriter::TBufState& from) { return Buf.Reset(from); } diff --git a/library/cpp/json/ut/json_reader_fast_ut.cpp b/library/cpp/json/ut/json_reader_fast_ut.cpp index 60dffc91c7..4ecd698d56 100644 --- a/library/cpp/json/ut/json_reader_fast_ut.cpp +++ b/library/cpp/json/ut/json_reader_fast_ut.cpp @@ -280,7 +280,7 @@ public: } void TestReadJsonFastTree() { - const TString json = R"( + const TString json = R"( { "a": { "b": {} diff --git a/library/cpp/json/ut/json_reader_ut.cpp b/library/cpp/json/ut/json_reader_ut.cpp index cd31afa0b8..dd75332971 100644 --- a/library/cpp/json/ut/json_reader_ut.cpp +++ b/library/cpp/json/ut/json_reader_ut.cpp @@ -68,9 +68,9 @@ public: Y_UNIT_TEST_SUITE(TJsonReaderTest) { Y_UNIT_TEST(JsonReformatTest) { - TString data = "{\"null value\": null, \"intkey\": 10, \"double key\": 11.11, \"string key\": \"string\", \"array\": [1,2,3,\"TString\"], \"bool key\": true}"; + TString data = "{\"null value\": null, \"intkey\": 10, \"double key\": 11.11, \"string key\": \"string\", \"array\": [1,2,3,\"TString\"], \"bool key\": true}"; - TString result1, result2; + TString result1, result2; { TStringStream in; in << data; @@ -120,7 +120,7 @@ Y_UNIT_TEST_SUITE(TJsonReaderTest) { } Y_UNIT_TEST(TJsonTreeTest) { - TString data = "{\"intkey\": 10, \"double key\": 11.11, \"null value\":null, \"string key\": \"string\", \"array\": [1,2,3,\"TString\"], \"bool key\": true}"; + TString data = "{\"intkey\": 10, \"double key\": 11.11, \"null value\":null, \"string key\": \"string\", \"array\": [1,2,3,\"TString\"], \"bool key\": true}"; TStringStream in; in << data; TJsonValue value; @@ -130,7 +130,7 @@ Y_UNIT_TEST_SUITE(TJsonReaderTest) { UNIT_ASSERT_DOUBLES_EQUAL(value["double key"].GetDouble(), 11.11, 0.001); UNIT_ASSERT_VALUES_EQUAL(value["bool key"].GetBoolean(), true); UNIT_ASSERT_VALUES_EQUAL(value["absent string key"].GetString(), TString("")); - UNIT_ASSERT_VALUES_EQUAL(value["string key"].GetString(), TString("string")); + UNIT_ASSERT_VALUES_EQUAL(value["string key"].GetString(), TString("string")); UNIT_ASSERT_VALUES_EQUAL(value["array"][0].GetInteger(), 1); UNIT_ASSERT_VALUES_EQUAL(value["array"][1].GetInteger(), 2); UNIT_ASSERT_VALUES_EQUAL(value["array"][2].GetInteger(), 3); @@ -155,19 +155,19 @@ Y_UNIT_TEST_SUITE(TJsonReaderTest) { } Y_UNIT_TEST(TJsonRomaTest) { - TString data = "{\"test\": [ {\"name\": \"A\"} ]}"; + TString data = "{\"test\": [ {\"name\": \"A\"} ]}"; TStringStream in; in << data; TJsonValue value; ReadJsonTree(&in, &value); - UNIT_ASSERT_VALUES_EQUAL(value["test"][0]["name"].GetString(), TString("A")); + UNIT_ASSERT_VALUES_EQUAL(value["test"][0]["name"].GetString(), TString("A")); } Y_UNIT_TEST(TJsonReadTreeWithComments) { { - TString leadingCommentData = "{ // \"test\" : 1 \n}"; + TString leadingCommentData = "{ // \"test\" : 1 \n}"; { // No comments allowed TStringStream in; @@ -187,7 +187,7 @@ Y_UNIT_TEST_SUITE(TJsonReaderTest) { } { - TString trailingCommentData = "{ \"test1\" : 1 // \"test2\" : 2 \n }"; + TString trailingCommentData = "{ \"test1\" : 1 // \"test2\" : 2 \n }"; { // No comments allowed TStringStream in; @@ -375,7 +375,7 @@ Y_UNIT_TEST_SUITE(TJsonReaderTest) { Y_UNIT_TEST(TJsonMemoryLeakTest) { // after https://clubs.at.yandex-team.ru/stackoverflow/3691 - TString s = "."; + TString s = "."; NJson::TJsonValue json; try { TStringInput in(s); diff --git a/library/cpp/json/ut/json_writer_ut.cpp b/library/cpp/json/ut/json_writer_ut.cpp index ca11d34dad..ae60f208d4 100644 --- a/library/cpp/json/ut/json_writer_ut.cpp +++ b/library/cpp/json/ut/json_writer_ut.cpp @@ -7,9 +7,9 @@ using namespace NJson; Y_UNIT_TEST_SUITE(TJsonWriterTest) { Y_UNIT_TEST(SimpleWriteTest) { - TString expected1 = "{\"key1\":1,\"key2\":2,\"key3\":3"; + TString expected1 = "{\"key1\":1,\"key2\":2,\"key3\":3"; TString expected2 = expected1 + ",\"array\":[\"stroka\",false]"; - TString expected3 = expected2 + "}"; + TString expected3 = expected2 + "}"; TStringStream out; @@ -42,7 +42,7 @@ Y_UNIT_TEST_SUITE(TJsonWriterTest) { } Y_UNIT_TEST(SimpleWriteValueTest) { - TString expected = "{\"key1\":null,\"key2\":{\"subkey1\":[1,{\"subsubkey\":\"test2\"},null,true],\"subkey2\":\"test\"}}"; + TString expected = "{\"key1\":null,\"key2\":{\"subkey1\":[1,{\"subsubkey\":\"test2\"},null,true],\"subkey2\":\"test\"}}"; TJsonValue v; v["key1"] = JSON_NULL; v["key2"]["subkey1"].AppendValue(1); @@ -56,7 +56,7 @@ Y_UNIT_TEST_SUITE(TJsonWriterTest) { } Y_UNIT_TEST(FormatOutput) { - TString expected = "{\n \"key1\":null,\n \"key2\":\n {\n \"subkey1\":\n [\n 1,\n {\n \"subsubkey\":\"test2\"\n },\n null,\n true\n ],\n \"subkey2\":\"test\"\n }\n}"; + TString expected = "{\n \"key1\":null,\n \"key2\":\n {\n \"subkey1\":\n [\n 1,\n {\n \"subsubkey\":\"test2\"\n },\n null,\n true\n ],\n \"subkey2\":\"test\"\n }\n}"; TJsonValue v; v["key1"] = JSON_NULL; v["key2"]["subkey1"].AppendValue(1); @@ -70,7 +70,7 @@ Y_UNIT_TEST_SUITE(TJsonWriterTest) { } Y_UNIT_TEST(SortKeys) { - TString expected = "{\"a\":null,\"j\":null,\"n\":null,\"y\":null,\"z\":null}"; + TString expected = "{\"a\":null,\"j\":null,\"n\":null,\"y\":null,\"z\":null}"; TJsonValue v; v["z"] = JSON_NULL; v["n"] = JSON_NULL; @@ -84,7 +84,7 @@ Y_UNIT_TEST_SUITE(TJsonWriterTest) { Y_UNIT_TEST(SimpleUnsignedIntegerWriteTest) { { - TString expected = "{\"test\":1}"; + TString expected = "{\"test\":1}"; TJsonValue v; v.InsertValue("test", 1ull); TStringStream out; @@ -93,7 +93,7 @@ Y_UNIT_TEST_SUITE(TJsonWriterTest) { } // 1 { - TString expected = "{\"test\":-1}"; + TString expected = "{\"test\":-1}"; TJsonValue v; v.InsertValue("test", -1); TStringStream out; @@ -102,7 +102,7 @@ Y_UNIT_TEST_SUITE(TJsonWriterTest) { } // -1 { - TString expected = "{\"test\":18446744073709551615}"; + TString expected = "{\"test\":18446744073709551615}"; TJsonValue v; v.InsertValue("test", 18446744073709551615ull); TStringStream out; @@ -111,7 +111,7 @@ Y_UNIT_TEST_SUITE(TJsonWriterTest) { } // 18446744073709551615 { - TString expected = "{\"test\":[1,18446744073709551615]}"; + TString expected = "{\"test\":[1,18446744073709551615]}"; TJsonValue v; v.InsertValue("test", TJsonValue()); v["test"].AppendValue(1); @@ -123,62 +123,62 @@ Y_UNIT_TEST_SUITE(TJsonWriterTest) { } // SimpleUnsignedIntegerWriteTest Y_UNIT_TEST(WriteOptionalTest) { - { - TString expected = "{\"test\":1}"; - - TStringStream out; - - TJsonWriter json(&out, false); - json.OpenMap(); - json.WriteOptional("test", MakeMaybe<int>(1)); - json.CloseMap(); - json.Flush(); - UNIT_ASSERT_VALUES_EQUAL(out.Str(), expected); - } - - { - TString expected = "{}"; - - TStringStream out; - - TMaybe<int> nothing = Nothing(); - - TJsonWriter json(&out, false); - json.OpenMap(); - json.WriteOptional("test", nothing); - json.CloseMap(); - json.Flush(); - UNIT_ASSERT_VALUES_EQUAL(out.Str(), expected); - } - - { - TString expected = "{}"; - - TStringStream out; - - TMaybe<int> empty; - - TJsonWriter json(&out, false); - json.OpenMap(); - json.WriteOptional("test", empty); - json.CloseMap(); - json.Flush(); - UNIT_ASSERT_VALUES_EQUAL(out.Str(), expected); - } - - { - TString expected = "{}"; - - TStringStream out; - - TJsonWriter json(&out, false); - json.OpenMap(); - json.WriteOptional("test", Nothing()); - json.CloseMap(); - json.Flush(); - UNIT_ASSERT_VALUES_EQUAL(out.Str(), expected); - } - } + { + TString expected = "{\"test\":1}"; + + TStringStream out; + + TJsonWriter json(&out, false); + json.OpenMap(); + json.WriteOptional("test", MakeMaybe<int>(1)); + json.CloseMap(); + json.Flush(); + UNIT_ASSERT_VALUES_EQUAL(out.Str(), expected); + } + + { + TString expected = "{}"; + + TStringStream out; + + TMaybe<int> nothing = Nothing(); + + TJsonWriter json(&out, false); + json.OpenMap(); + json.WriteOptional("test", nothing); + json.CloseMap(); + json.Flush(); + UNIT_ASSERT_VALUES_EQUAL(out.Str(), expected); + } + + { + TString expected = "{}"; + + TStringStream out; + + TMaybe<int> empty; + + TJsonWriter json(&out, false); + json.OpenMap(); + json.WriteOptional("test", empty); + json.CloseMap(); + json.Flush(); + UNIT_ASSERT_VALUES_EQUAL(out.Str(), expected); + } + + { + TString expected = "{}"; + + TStringStream out; + + TJsonWriter json(&out, false); + json.OpenMap(); + json.WriteOptional("test", Nothing()); + json.CloseMap(); + json.Flush(); + UNIT_ASSERT_VALUES_EQUAL(out.Str(), expected); + } + } Y_UNIT_TEST(Callback) { NJsonWriter::TBuf json; diff --git a/library/cpp/json/writer/json.h b/library/cpp/json/writer/json.h index 0aae2531b9..d7c77f9c63 100644 --- a/library/cpp/json/writer/json.h +++ b/library/cpp/json/writer/json.h @@ -2,7 +2,7 @@ #include <util/generic/noncopyable.h> #include <util/generic/ptr.h> -#include <util/generic/string.h> +#include <util/generic/string.h> #include <util/generic/vector.h> #include <util/generic/yexception.h> #include <util/stream/str.h> @@ -36,7 +36,7 @@ namespace NJsonWriter { struct TBufState { bool NeedComma; bool NeedNewline; - TVector<EJsonEntity> Stack; + TVector<EJsonEntity> Stack; }; class TBuf : TNonCopyable { @@ -88,7 +88,7 @@ namespace NJsonWriter { /*** Return the string formed in the internal TStringStream. * You may only call it if the `stream' parameter was NULL * at construction time. */ - const TString& Str() const; + const TString& Str() const; /*** Dump and forget the string constructed so far. * You may only call it if the `stream' parameter was NULL @@ -147,10 +147,10 @@ namespace NJsonWriter { private: IOutputStream* Stream; THolder<TStringStream> StringStream; - typedef TVector<const TString*> TKeys; + typedef TVector<const TString*> TKeys; TKeys Keys; - TVector<EJsonEntity> Stack; + TVector<EJsonEntity> Stack; bool NeedComma; bool NeedNewline; const EHtmlEscapeMode EscapeMode; diff --git a/library/cpp/json/writer/json_ut.cpp b/library/cpp/json/writer/json_ut.cpp index 9980555683..a05d39f0a9 100644 --- a/library/cpp/json/writer/json_ut.cpp +++ b/library/cpp/json/writer/json_ut.cpp @@ -32,14 +32,14 @@ Y_UNIT_TEST_SUITE(JsonWriter) { Y_UNIT_TEST(EscapedString) { NJsonWriter::TBuf w(NJsonWriter::HEM_ESCAPE_HTML); w.WriteString(" \n \r \t \007 \b \f ' <tag> &ent; \"txt\" "); - TString ws = w.Str(); + TString ws = w.Str(); const char* exp = "\" \\n \\r \\t \\u0007 \\b \\f ' <tag> &ent; "txt" \""; UNIT_ASSERT_STRINGS_EQUAL(ws.c_str(), exp); } Y_UNIT_TEST(UnescapedString) { NJsonWriter::TBuf w; w.WriteString(" \n \r \t \b \f '; -- <tag> &ent; \"txt\"", NJsonWriter::HEM_DONT_ESCAPE_HTML); - TString ws = w.Str(); + TString ws = w.Str(); const char* exp = "\" \\n \\r \\t \\b \\f \\u0027; -- \\u003Ctag\\u003E &ent; \\\"txt\\\"\""; UNIT_ASSERT_STRINGS_EQUAL(ws.c_str(), exp); } @@ -48,12 +48,12 @@ Y_UNIT_TEST_SUITE(JsonWriter) { w.UnsafeWriteRawBytes("(", 1); w.BeginList().WriteString("<>&'\\").BeginList(); w.EndList().EndList(); - TString ws = w.Str(); + TString ws = w.Str(); const char* exp = "([\"\\u003C\\u003E&\\u0027\\\\\",[]]"; UNIT_ASSERT_STRINGS_EQUAL(ws.c_str(), exp); } Y_UNIT_TEST(Utf8) { - TString ws = NJsonWriter::TBuf().WriteString("яЯ σΣ ש א").Str(); + TString ws = NJsonWriter::TBuf().WriteString("яЯ σΣ ש א").Str(); const char* exp = "\"яЯ σΣ ש א\""; UNIT_ASSERT_STRINGS_EQUAL(ws.c_str(), exp); } @@ -80,14 +80,14 @@ Y_UNIT_TEST_SUITE(JsonWriter) { .CompatWriteKeyWithoutQuotes("n") .WriteInt(0) .EndObject(); - TString ws = w.Str(); + TString ws = w.Str(); const char* exp = "{p:1,n:0}"; UNIT_ASSERT_STRINGS_EQUAL(ws.c_str(), exp); } Y_UNIT_TEST(UnescapedStringInObject) { NJsonWriter::TBuf w(NJsonWriter::HEM_DONT_ESCAPE_HTML); w.BeginObject().WriteKey("key").WriteString("</&>'").EndObject(); - TString ws = w.Str(); + TString ws = w.Str(); const char* exp = "{\"key\":\"\\u003C\\/&\\u003E\\u0027\"}"; UNIT_ASSERT_STRINGS_EQUAL(ws.c_str(), exp); } diff --git a/library/cpp/json/writer/json_value.cpp b/library/cpp/json/writer/json_value.cpp index c61e8d1dc4..79623a732a 100644 --- a/library/cpp/json/writer/json_value.cpp +++ b/library/cpp/json/writer/json_value.cpp @@ -23,15 +23,15 @@ AreJsonMapsEqual(const NJson::TJsonValue& lhs, const NJson::TJsonValue& rhs) { if (rhs.GetType() != JSON_MAP) return false; - typedef TJsonValue::TMapType TMapType; - const TMapType& lhsMap = lhs.GetMap(); - const TMapType& rhsMap = rhs.GetMap(); + typedef TJsonValue::TMapType TMapType; + const TMapType& lhsMap = lhs.GetMap(); + const TMapType& rhsMap = rhs.GetMap(); if (lhsMap.size() != rhsMap.size()) return false; for (const auto& lhsIt : lhsMap) { - TMapType::const_iterator rhsIt = rhsMap.find(lhsIt.first); + TMapType::const_iterator rhsIt = rhsMap.find(lhsIt.first); if (rhsIt == rhsMap.end()) return false; diff --git a/library/cpp/json/writer/json_value.h b/library/cpp/json/writer/json_value.h index 3f0f50bc4c..97bf582550 100644 --- a/library/cpp/json/writer/json_value.h +++ b/library/cpp/json/writer/json_value.h @@ -2,7 +2,7 @@ #include <library/cpp/json/common/defs.h> -#include <util/generic/string.h> +#include <util/generic/string.h> #include <util/generic/hash.h> #include <util/generic/vector.h> #include <util/generic/deque.h> diff --git a/library/cpp/json/writer/json_value_ut.cpp b/library/cpp/json/writer/json_value_ut.cpp index dc7f6affdf..30b8dda6f8 100644 --- a/library/cpp/json/writer/json_value_ut.cpp +++ b/library/cpp/json/writer/json_value_ut.cpp @@ -500,8 +500,8 @@ Y_UNIT_TEST_SUITE(TJsonValueTest) { expectedJson.InsertValue("foo", "bar"); UNIT_ASSERT(json == expectedJson); - TJsonValue::TMapType jsonMap = std::move(json.GetMapSafe()); - TJsonValue::TMapType expectedMap = {{"foo", TJsonValue{"bar"}}}; + TJsonValue::TMapType jsonMap = std::move(json.GetMapSafe()); + TJsonValue::TMapType expectedMap = {{"foo", TJsonValue{"bar"}}}; UNIT_ASSERT(jsonMap == expectedMap); } } @@ -601,7 +601,7 @@ Y_UNIT_TEST_SUITE(TJsonValueTest) { } Y_UNIT_TEST(GetIntegerRobustBignumStringTest) { - TString value = "1626862681464633683"; + TString value = "1626862681464633683"; TJsonValue json(value); UNIT_ASSERT_VALUES_EQUAL(json.GetUIntegerRobust(), FromString<ui64>(value)); UNIT_ASSERT_VALUES_EQUAL(json.GetIntegerRobust(), FromString<i64>(value)); @@ -619,7 +619,7 @@ Y_UNIT_TEST_SUITE(TJsonValueTest) { "Testing TJsonValue& operator=(TJsonValue&&) subpart self moving " "after TJsonValue was constrcuted from TString&&."; - json["hello"] = TString{longTestString}; + json["hello"] = TString{longTestString}; json = std::move(json["hello"]); UNIT_ASSERT_VALUES_EQUAL(json.GetString(), longTestString); } diff --git a/library/cpp/json/yson/json2yson.cpp b/library/cpp/json/yson/json2yson.cpp index f72cb7a9ef..97e81d15b5 100644 --- a/library/cpp/json/yson/json2yson.cpp +++ b/library/cpp/json/yson/json2yson.cpp @@ -36,7 +36,7 @@ namespace NJson2Yson { } case NJson::JSON_MAP: { adapter->OnOpenMap(); - const NJson::TJsonValue::TMapType& map = jsonValue.GetMap(); + const NJson::TJsonValue::TMapType& map = jsonValue.GetMap(); for (const auto& it : map) { adapter->OnMapKey(it.first); WriteJsonValue(it.second, adapter); diff --git a/library/cpp/json/yson/json2yson_ut.cpp b/library/cpp/json/yson/json2yson_ut.cpp index 9eb23354cf..e17ef14e35 100644 --- a/library/cpp/json/yson/json2yson_ut.cpp +++ b/library/cpp/json/yson/json2yson_ut.cpp @@ -26,7 +26,7 @@ static TString GetRequestsWithDecoding(const TString& inputPath, const NBlockCod Y_UNIT_TEST_SUITE(Json2Yson) { Y_UNIT_TEST(NOAPACHE_REQUESTS) { const ui32 warmUpRetries = 5; - const TVector<double> percentiles = {0.25, 0.5, 0.6, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 0.97, 0.99, 1.0}; + const TVector<double> percentiles = {0.25, 0.5, 0.6, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 0.97, 0.99, 1.0}; NSimpleHistogram::TMultiHistogramCalcer<ui64> calcer; |