diff options
author | alexcrush <alexcrush@yandex-team.ru> | 2022-02-10 16:50:33 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:33 +0300 |
commit | 34f0683c2d7731f2f9f59966c12e602f405fa0d6 (patch) | |
tree | 9af7dd74efcfa3d8aa7b40bd757ad8f2d89f6902 /library/cpp/protobuf/json/ut/proto2json_ut.cpp | |
parent | a1d67d6a31f789aa011250c3edce5751c0cadad2 (diff) | |
download | ydb-34f0683c2d7731f2f9f59966c12e602f405fa0d6.tar.gz |
Restoring authorship annotation for <alexcrush@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/protobuf/json/ut/proto2json_ut.cpp')
-rw-r--r-- | library/cpp/protobuf/json/ut/proto2json_ut.cpp | 16 |
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 07e52d7f2f..31264e4a74 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 { |