aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/protobuf/json
diff options
context:
space:
mode:
authorkartynnik <kartynnik@yandex-team.ru>2022-02-10 16:48:07 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:07 +0300
commitdf6128370874866447314ec18d8e67fc7bde40b4 (patch)
treeb222e5ac2e2e98872661c51ccceee5da0d291e13 /library/cpp/protobuf/json
parentca2a705e6e39e85df30054d7e806e572de9cfe23 (diff)
downloadydb-df6128370874866447314ec18d8e67fc7bde40b4.tar.gz
Restoring authorship annotation for <kartynnik@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/protobuf/json')
-rw-r--r--library/cpp/protobuf/json/proto2json.h6
-rw-r--r--library/cpp/protobuf/json/ut/json.h6
-rw-r--r--library/cpp/protobuf/json/ut/proto2json_ut.cpp10
3 files changed, 11 insertions, 11 deletions
diff --git a/library/cpp/protobuf/json/proto2json.h b/library/cpp/protobuf/json/proto2json.h
index c7770a62b8..89a1781a40 100644
--- a/library/cpp/protobuf/json/proto2json.h
+++ b/library/cpp/protobuf/json/proto2json.h
@@ -10,7 +10,7 @@
#include <util/generic/fwd.h>
#include <util/generic/vector.h>
#include <util/generic/yexception.h>
-#include <util/stream/str.h>
+#include <util/stream/str.h>
#include <functional>
@@ -51,7 +51,7 @@ namespace NProtobufJson {
inline void Proto2Json(const T& proto, TStringStream& out) {
out << proto.AsJSON();
}
-
+
/// @throw yexception
void Proto2Json(const NProtoBuf::Message& proto, TString& str,
const TProto2JsonConfig& config);
@@ -75,4 +75,4 @@ namespace NProtobufJson {
return result;
}
-}
+}
diff --git a/library/cpp/protobuf/json/ut/json.h b/library/cpp/protobuf/json/ut/json.h
index 2ee855cf61..c1f108e6e4 100644
--- a/library/cpp/protobuf/json/ut/json.h
+++ b/library/cpp/protobuf/json/ut/json.h
@@ -55,9 +55,9 @@ namespace NProtobufJsonTest {
#define UNIT_ASSERT_JSONS_EQUAL(lhs, rhs) \
if (lhs != rhs) { \
- UNIT_ASSERT_STRINGS_EQUAL(lhs.GetStringRobust(), rhs.GetStringRobust()); \
- }
-
+ UNIT_ASSERT_STRINGS_EQUAL(lhs.GetStringRobust(), rhs.GetStringRobust()); \
+ }
+
#define UNIT_ASSERT_JSON_STRINGS_EQUAL(lhs, rhs) \
if (lhs != rhs) { \
NJson::TJsonValue _lhs_json, _rhs_json; \
diff --git a/library/cpp/protobuf/json/ut/proto2json_ut.cpp b/library/cpp/protobuf/json/ut/proto2json_ut.cpp
index f447f5bb5f..07e52d7f2f 100644
--- a/library/cpp/protobuf/json/ut/proto2json_ut.cpp
+++ b/library/cpp/protobuf/json/ut/proto2json_ut.cpp
@@ -201,7 +201,7 @@ Y_UNIT_TEST(TestFlatRepeated) {
UNIT_ASSERT_JSONS_EQUAL(json, modelJson);
} // streamed
}
-
+
TProto2JsonConfig config;
config.SetMissingRepeatedKeyMode(TProto2JsonConfig::MissingKeySkip);
@@ -358,7 +358,7 @@ Y_UNIT_TEST(TestCompositeRepeated) {
{
NJson::TJsonValue json;
UNIT_ASSERT_NO_EXCEPTION(Proto2Json(proto, json));
- UNIT_ASSERT_JSONS_EQUAL(json, modelJson);
+ UNIT_ASSERT_JSONS_EQUAL(json, modelJson);
}
{
@@ -366,7 +366,7 @@ Y_UNIT_TEST(TestCompositeRepeated) {
NJson::TJsonValue json;
UNIT_ASSERT_NO_EXCEPTION(Proto2Json(proto, jsonStream));
UNIT_ASSERT(ReadJsonTree(&jsonStream, &json));
- UNIT_ASSERT_JSONS_EQUAL(json, modelJson);
+ UNIT_ASSERT_JSONS_EQUAL(json, modelJson);
} // streamed
}
} // TestCompositeRepeated
@@ -518,12 +518,12 @@ Y_UNIT_TEST(TestMissingRepeatedKeyNoConfig) {
TFlatRepeated proto;
NJson::TJsonValue modelJson(NJson::JSON_MAP);
NJson::TJsonValue json;
-
+
UNIT_ASSERT_NO_EXCEPTION(Proto2Json(proto, json));
UNIT_ASSERT_JSONS_EQUAL(json, modelJson);
}
} // TestMissingRepeatedKeyNoConfig
-
+
Y_UNIT_TEST(TestMissingRepeatedKeyConfig) {
{
TFlatRepeated proto;