diff options
author | a-sidorin <a-sidorin@yandex-team.ru> | 2022-02-10 16:50:02 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:02 +0300 |
commit | 4ffc252d74adad4b93762976940ef53012cb98df (patch) | |
tree | 952cbe0b436f3e57e08bf18a38893ef5214f6562 /library/cpp | |
parent | 0d6462b7e878d92e0a81ff7d47886837220f4a1a (diff) | |
download | ydb-4ffc252d74adad4b93762976940ef53012cb98df.tar.gz |
Restoring authorship annotation for <a-sidorin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp')
-rw-r--r-- | library/cpp/monlib/service/pages/registry_mon_page.cpp | 6 | ||||
-rw-r--r-- | library/cpp/protobuf/json/json2proto.cpp | 2 | ||||
-rw-r--r-- | library/cpp/protobuf/json/ut/json2proto_ut.cpp | 2 | ||||
-rw-r--r-- | library/cpp/scheme/domscheme_traits.h | 4 | ||||
-rw-r--r-- | library/cpp/scheme/scheme.cpp | 4 | ||||
-rw-r--r-- | library/cpp/scheme/tests/ut/scheme_json_ut.cpp | 26 |
6 files changed, 22 insertions, 22 deletions
diff --git a/library/cpp/monlib/service/pages/registry_mon_page.cpp b/library/cpp/monlib/service/pages/registry_mon_page.cpp index c59e50f622..931ffed8c0 100644 --- a/library/cpp/monlib/service/pages/registry_mon_page.cpp +++ b/library/cpp/monlib/service/pages/registry_mon_page.cpp @@ -4,7 +4,7 @@ #include <library/cpp/monlib/encode/json/json.h> #include <library/cpp/monlib/encode/prometheus/prometheus.h> #include <library/cpp/monlib/encode/spack/spack_v1.h> -#include <library/cpp/monlib/service/format.h> +#include <library/cpp/monlib/service/format.h> namespace NMonitoring { void TMetricRegistryPage::Output(NMonitoring::IMonHttpRequest& request) { @@ -20,8 +20,8 @@ namespace NMonitoring { encoder = NMonitoring::EncoderJson(&out); } else if (formatStr == TStringBuf("spack")) { resp = HTTPOKSPACK; - const auto compression = ParseCompression(request); - encoder = NMonitoring::EncoderSpackV1(&out, ETimePrecision::SECONDS, compression); + const auto compression = ParseCompression(request); + encoder = NMonitoring::EncoderSpackV1(&out, ETimePrecision::SECONDS, compression); } else if (formatStr == TStringBuf("prometheus")) { resp = HTTPOKPROMETHEUS; encoder = NMonitoring::EncoderPrometheus(&out); diff --git a/library/cpp/protobuf/json/json2proto.cpp b/library/cpp/protobuf/json/json2proto.cpp index 640c10f5a5..6916d23b0e 100644 --- a/library/cpp/protobuf/json/json2proto.cpp +++ b/library/cpp/protobuf/json/json2proto.cpp @@ -88,7 +88,7 @@ JsonString2Field(const NJson::TJsonValue& json, Y_ASSERT(!!reflection); if (!json.IsString() && !config.CastRobust) { - ythrow yexception() << "Invalid type of JSON field '" << field.name() << "': " + ythrow yexception() << "Invalid type of JSON field '" << field.name() << "': " << "IsString() failed while " << "CPPTYPE_STRING is expected."; } diff --git a/library/cpp/protobuf/json/ut/json2proto_ut.cpp b/library/cpp/protobuf/json/ut/json2proto_ut.cpp index 0dfe57bc7a..9d8d8bb19a 100644 --- a/library/cpp/protobuf/json/ut/json2proto_ut.cpp +++ b/library/cpp/protobuf/json/ut/json2proto_ut.cpp @@ -985,7 +985,7 @@ Y_UNIT_TEST(TestMapAsObjectConfigNotSet) { TJson2ProtoConfig config; UNIT_ASSERT_EXCEPTION_CONTAINS( Json2Proto<TMapType>(modelStr, config), yexception, - "Map as object representation is not allowed"); + "Map as object representation is not allowed"); } // TestMapAsObjectNotSet Y_UNIT_TEST(TestMergeFlatOptional) { diff --git a/library/cpp/scheme/domscheme_traits.h b/library/cpp/scheme/domscheme_traits.h index a11c4dd444..c8d17a38e2 100644 --- a/library/cpp/scheme/domscheme_traits.h +++ b/library/cpp/scheme/domscheme_traits.h @@ -52,7 +52,7 @@ struct TSchemeTraits { } static inline void ArrayClear(TValueRef v) { - v->SetArray(); + v->SetArray(); v->ClearArray(); } @@ -84,7 +84,7 @@ struct TSchemeTraits { } static inline void DictClear(TValueRef v) { - v->SetDict(); + v->SetDict(); v->ClearDict(); } diff --git a/library/cpp/scheme/scheme.cpp b/library/cpp/scheme/scheme.cpp index 3efd116d4f..1d706798a8 100644 --- a/library/cpp/scheme/scheme.cpp +++ b/library/cpp/scheme/scheme.cpp @@ -418,14 +418,14 @@ namespace NSc { core.SetString(val.GetString()); break; case NJson::JSON_ARRAY: { - core.SetArray(); + core.SetArray(); for (const auto& item : val.GetArray()) { FromJsonValue(core.Push(), item); } break; } case NJson::JSON_MAP: { - core.SetDict(); + core.SetDict(); for (const auto& item : val.GetMap()) { FromJsonValue(core.Add(item.first), item.second); } diff --git a/library/cpp/scheme/tests/ut/scheme_json_ut.cpp b/library/cpp/scheme/tests/ut/scheme_json_ut.cpp index daeb2654f9..b8aca8058a 100644 --- a/library/cpp/scheme/tests/ut/scheme_json_ut.cpp +++ b/library/cpp/scheme/tests/ut/scheme_json_ut.cpp @@ -138,19 +138,19 @@ Y_UNIT_TEST_SUITE(TSchemeJsonTest) { UNIT_ASSERT_JSON_EQ_JSON(a, b); } - Y_UNIT_TEST(TestJsonEmptyContainers) { - { - NSc::TValue a = NSc::NUt::AssertFromJson("{a:[]}"); - NSc::TValue b = NSc::TValue::FromJsonValue(a.ToJsonValue()); - UNIT_ASSERT_JSON_EQ_JSON(a, b); - } - { - NSc::TValue a = NSc::NUt::AssertFromJson("{a:{}}"); - NSc::TValue b = NSc::TValue::FromJsonValue(a.ToJsonValue()); - UNIT_ASSERT_JSON_EQ_JSON(a, b); - } - } - + Y_UNIT_TEST(TestJsonEmptyContainers) { + { + NSc::TValue a = NSc::NUt::AssertFromJson("{a:[]}"); + NSc::TValue b = NSc::TValue::FromJsonValue(a.ToJsonValue()); + UNIT_ASSERT_JSON_EQ_JSON(a, b); + } + { + NSc::TValue a = NSc::NUt::AssertFromJson("{a:{}}"); + NSc::TValue b = NSc::TValue::FromJsonValue(a.ToJsonValue()); + UNIT_ASSERT_JSON_EQ_JSON(a, b); + } + } + Y_UNIT_TEST(TestDuplicateKeys) { const TStringBuf duplicatedKeys = "{\"a\":[{\"b\":1, \"b\":42}]}"; UNIT_ASSERT_NO_EXCEPTION(NSc::TValue::FromJsonThrow(duplicatedKeys)); |