aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/protobuf/json/ut/proto2json_ut.cpp
diff options
context:
space:
mode:
authoralexcrush <alexcrush@yandex-team.ru>2022-02-10 16:50:33 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:33 +0300
commit923c477d52607f8f7ba049046234075fc393db76 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/protobuf/json/ut/proto2json_ut.cpp
parent34f0683c2d7731f2f9f59966c12e602f405fa0d6 (diff)
downloadydb-923c477d52607f8f7ba049046234075fc393db76.tar.gz
Restoring authorship annotation for <alexcrush@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/protobuf/json/ut/proto2json_ut.cpp')
-rw-r--r--library/cpp/protobuf/json/ut/proto2json_ut.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/protobuf/json/ut/proto2json_ut.cpp b/library/cpp/protobuf/json/ut/proto2json_ut.cpp
index 31264e4a74..07e52d7f2f 100644
--- a/library/cpp/protobuf/json/ut/proto2json_ut.cpp
+++ b/library/cpp/protobuf/json/ut/proto2json_ut.cpp
@@ -631,37 +631,37 @@ public:
str = "bytes";
}
};
-
+
Y_UNIT_TEST(TestBytesTransform) {
// Test that string field is not changed
{
TString modelStr(R"_({"String":"value"})_");
-
+
TFlatOptional proto;
proto.SetString(R"_(value)_");
TProto2JsonConfig config;
config.StringTransforms.push_back(new TBytesTransform());
TStringStream jsonStr;
-
+
UNIT_ASSERT_NO_EXCEPTION(Proto2Json(proto, jsonStr, config));
UNIT_ASSERT_JSON_STRINGS_EQUAL(jsonStr.Str(), modelStr);
}
-
+
// Test that bytes field is changed
{
TString modelStr(R"_({"Bytes":"bytes"})_");
-
+
TFlatOptional proto;
proto.SetBytes(R"_(value)_");
TProto2JsonConfig config;
config.StringTransforms.push_back(new TBytesTransform());
TStringStream jsonStr;
-
+
UNIT_ASSERT_NO_EXCEPTION(Proto2Json(proto, jsonStr, config));
UNIT_ASSERT_JSON_STRINGS_EQUAL(jsonStr.Str(), modelStr);
- }
+ }
}
-
+
Y_UNIT_TEST(TestFieldNameMode) {
// Original case 1
{