Browse Source

Restoring authorship annotation for <alexcrush@yandex-team.ru>. Commit 2 of 2.

alexcrush 3 years ago
parent
commit
923c477d52

+ 3 - 3
library/cpp/messagebus/handler.cpp

@@ -30,7 +30,7 @@ void TOnMessageContext::ForgetRequest() {
 TNetAddr TOnMessageContext::GetPeerAddrNetAddr() const {
     return Ident.GetNetAddr();
 }
- 
-bool TOnMessageContext::IsConnectionAlive() const { 
+
+bool TOnMessageContext::IsConnectionAlive() const {
     return !!Ident.Connection && Ident.Connection->IsAlive();
-} 
+}

+ 1 - 1
library/cpp/messagebus/handler.h

@@ -113,7 +113,7 @@ namespace NBus {
         }
 
         TNetAddr GetPeerAddrNetAddr() const;
- 
+
         bool IsConnectionAlive() const;
     };
 

+ 7 - 7
library/cpp/messagebus/oldmodule/module.cpp

@@ -209,7 +209,7 @@ namespace NBus {
             {
             }
         };
- 
+
         struct TJobRunner: public TAtomicRefCount<TJobRunner>,
                             public NActor::TActor<TJobRunner>,
                             public NActor::TQueueInActor<TJobRunner, TJobResponseMessage>,
@@ -759,8 +759,8 @@ TBusSession* TMyModule::CreateExtSession(TBusMessageQueue& queue) {
         return strReturn;
     }
 
-} 
- 
+}
+
 void TBusModuleImpl::AddJob(TJobRunner* jobRunner) {
     TWhatThreadDoesAcquireGuard<TMutex> G(Lock, "modules: acquiring lock for AddJob");
     Jobs.push_back(jobRunner);
@@ -875,7 +875,7 @@ void TModuleClientHandler::OnError(TAutoPtr<TBusMessage> msg, EMessageStatus sta
         job->UnRef();
     }
 }
- 
-void TModuleClientHandler::OnClientConnectionEvent(const TClientConnectionEvent& event) { 
-    Module->OnClientConnectionEvent(event); 
-} 
+
+void TModuleClientHandler::OnClientConnectionEvent(const TClientConnectionEvent& event) {
+    Module->OnClientConnectionEvent(event);
+}

+ 1 - 1
library/cpp/messagebus/remote_connection.h

@@ -204,7 +204,7 @@ namespace NBus {
 
             struct TWriterData {
                 TAtomic Down;
- 
+
                 NEventLoop::TChannelPtr Channel;
                 ui32 SocketVersion;
 

+ 54 - 54
library/cpp/messagebus/test/ut/messagebus_ut.cpp

@@ -310,7 +310,7 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
         TExampleProtocol Proto;
         TSystemEvent MessageReceivedEvent; // 1 wait for 1 message
         TBusServerSessionPtr Session;
-        TMutex Lock_; 
+        TMutex Lock_;
         TDeque<TAutoPtr<TOnMessageContext>> DelayedMessages;
 
         TDelayReplyServer()
@@ -328,52 +328,52 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
 
         void OnMessage(TOnMessageContext& mess) override {
             Y_VERIFY(mess.IsConnectionAlive(), "connection should be alive here");
-            TAutoPtr<TOnMessageContext> delayedMsg(new TOnMessageContext); 
-            delayedMsg->Swap(mess); 
-            auto g(Guard(Lock_)); 
-            DelayedMessages.push_back(delayedMsg); 
+            TAutoPtr<TOnMessageContext> delayedMsg(new TOnMessageContext);
+            delayedMsg->Swap(mess);
+            auto g(Guard(Lock_));
+            DelayedMessages.push_back(delayedMsg);
             MessageReceivedEvent.Signal();
-        } 
+        }
 
-        bool CheckClientIsAlive() { 
-            auto g(Guard(Lock_)); 
+        bool CheckClientIsAlive() {
+            auto g(Guard(Lock_));
             for (auto& delayedMessage : DelayedMessages) {
                 if (!delayedMessage->IsConnectionAlive()) {
-                    return false; 
-                } 
-            } 
-            return true; 
-        } 
- 
-        bool CheckClientIsDead() const { 
-            auto g(Guard(Lock_)); 
+                    return false;
+                }
+            }
+            return true;
+        }
+
+        bool CheckClientIsDead() const {
+            auto g(Guard(Lock_));
             for (const auto& delayedMessage : DelayedMessages) {
                 if (delayedMessage->IsConnectionAlive()) {
-                    return false; 
-                } 
-            } 
-            return true; 
-        } 
- 
-        void ReplyToDelayedMessages() { 
-            while (true) { 
-                TOnMessageContext msg; 
-                { 
-                    auto g(Guard(Lock_)); 
-                    if (DelayedMessages.empty()) { 
-                        break; 
-                    } 
-                    DelayedMessages.front()->Swap(msg); 
-                    DelayedMessages.pop_front(); 
-                } 
-                TAutoPtr<TBusMessage> reply(new TExampleResponse(&Proto.ResponseCount)); 
-                msg.SendReplyMove(reply); 
-            } 
-        } 
-
-        size_t GetDelayedMessageCount() const { 
-            auto g(Guard(Lock_)); 
-            return DelayedMessages.size(); 
+                    return false;
+                }
+            }
+            return true;
+        }
+
+        void ReplyToDelayedMessages() {
+            while (true) {
+                TOnMessageContext msg;
+                {
+                    auto g(Guard(Lock_));
+                    if (DelayedMessages.empty()) {
+                        break;
+                    }
+                    DelayedMessages.front()->Swap(msg);
+                    DelayedMessages.pop_front();
+                }
+                TAutoPtr<TBusMessage> reply(new TExampleResponse(&Proto.ResponseCount));
+                msg.SendReplyMove(reply);
+            }
+        }
+
+        size_t GetDelayedMessageCount() const {
+            auto g(Guard(Lock_));
+            return DelayedMessages.size();
         }
 
         void OnError(TAutoPtr<TBusMessage> mess, EMessageStatus status) override {
@@ -397,10 +397,10 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
 
         client.Destroy();
 
-        UNIT_WAIT_FOR(server.CheckClientIsDead()); 
+        UNIT_WAIT_FOR(server.CheckClientIsDead());
+
+        server.ReplyToDelayedMessages();
 
-        server.ReplyToDelayedMessages(); 
- 
         // wait until all server message are delivered
         UNIT_WAIT_FOR(0 == server.Session->GetInFlight());
     }
@@ -654,23 +654,23 @@ Y_UNIT_TEST_SUITE(TMessageBusTests) {
 
         client.SendMessages(2, &addr);
 
-        for (size_t i = 0; i < 5; ++i) { 
-            // One MessageReceivedEvent indicates one message, we need to wait for two 
-            UNIT_ASSERT(server.MessageReceivedEvent.WaitT(TDuration::Seconds(5))); 
-            if (server.GetDelayedMessageCount() == 2) { 
-                break; 
-            } 
-        } 
+        for (size_t i = 0; i < 5; ++i) {
+            // One MessageReceivedEvent indicates one message, we need to wait for two
+            UNIT_ASSERT(server.MessageReceivedEvent.WaitT(TDuration::Seconds(5)));
+            if (server.GetDelayedMessageCount() == 2) {
+                break;
+            }
+        }
         UNIT_ASSERT_VALUES_EQUAL(server.GetDelayedMessageCount(), 2);
 
         size_t inFlight = client.Session->GetInFlight(addr);
         // 4 is for messagebus1 that adds inFlight counter twice for some reason
         UNIT_ASSERT(inFlight == 2 || inFlight == 4);
 
-        UNIT_ASSERT(server.CheckClientIsAlive()); 
+        UNIT_ASSERT(server.CheckClientIsAlive());
+
+        server.ReplyToDelayedMessages();
 
-        server.ReplyToDelayedMessages(); 
- 
         client.WaitReplies();
     }
 

+ 47 - 47
library/cpp/protobuf/json/json2proto.cpp

@@ -51,15 +51,15 @@ static TString GetFieldName(const google::protobuf::FieldDescriptor& field,
     }
 
     TString name = field.name();
-    switch (config.FieldNameMode) { 
-        case NProtobufJson::TJson2ProtoConfig::FieldNameOriginalCase: 
-            break; 
-        case NProtobufJson::TJson2ProtoConfig::FieldNameLowerCase: 
-            name.to_lower(); 
-            break; 
-        case NProtobufJson::TJson2ProtoConfig::FieldNameUpperCase: 
-            name.to_upper(); 
-            break; 
+    switch (config.FieldNameMode) {
+        case NProtobufJson::TJson2ProtoConfig::FieldNameOriginalCase:
+            break;
+        case NProtobufJson::TJson2ProtoConfig::FieldNameLowerCase:
+            name.to_lower();
+            break;
+        case NProtobufJson::TJson2ProtoConfig::FieldNameUpperCase:
+            name.to_upper();
+            break;
         case NProtobufJson::TJson2ProtoConfig::FieldNameCamelCase:
             if (!name.empty()) {
                 name[0] = AsciiToLower(name[0]);
@@ -73,43 +73,43 @@ static TString GetFieldName(const google::protobuf::FieldDescriptor& field,
             break;
         default:
             Y_VERIFY_DEBUG(false, "Unknown FieldNameMode.");
-    } 
-    return name; 
-} 
- 
+    }
+    return name;
+}
+
 static void
-JsonString2Field(const NJson::TJsonValue& json, 
-                 google::protobuf::Message& proto, 
-                 const google::protobuf::FieldDescriptor& field, 
+JsonString2Field(const NJson::TJsonValue& json,
+                 google::protobuf::Message& proto,
+                 const google::protobuf::FieldDescriptor& field,
                  const NProtobufJson::TJson2ProtoConfig& config) {
-    using namespace google::protobuf; 
- 
-    const Reflection* reflection = proto.GetReflection(); 
+    using namespace google::protobuf;
+
+    const Reflection* reflection = proto.GetReflection();
     Y_ASSERT(!!reflection);
- 
+
     if (!json.IsString() && !config.CastRobust) {
         ythrow yexception() << "Invalid type of JSON field '" << field.name() << "': "
-                            << "IsString() failed while " 
-                            << "CPPTYPE_STRING is expected."; 
-    } 
+                            << "IsString() failed while "
+                            << "CPPTYPE_STRING is expected.";
+    }
     TString value = json.GetStringRobust();
-    for (size_t i = 0, endI = config.StringTransforms.size(); i < endI; ++i) { 
+    for (size_t i = 0, endI = config.StringTransforms.size(); i < endI; ++i) {
         Y_ASSERT(!!config.StringTransforms[i]);
-        if (!!config.StringTransforms[i]) { 
-            if (field.type() == google::protobuf::FieldDescriptor::TYPE_BYTES) { 
-                config.StringTransforms[i]->TransformBytes(value); 
-            } else { 
-                config.StringTransforms[i]->Transform(value); 
-            } 
-        } 
-    } 
- 
-    if (field.is_repeated()) 
-        reflection->AddString(&proto, &field, value); 
-    else 
-        reflection->SetString(&proto, &field, value); 
-} 
- 
+        if (!!config.StringTransforms[i]) {
+            if (field.type() == google::protobuf::FieldDescriptor::TYPE_BYTES) {
+                config.StringTransforms[i]->TransformBytes(value);
+            } else {
+                config.StringTransforms[i]->Transform(value);
+            }
+        }
+    }
+
+    if (field.is_repeated())
+        reflection->AddString(&proto, &field, value);
+    else
+        reflection->SetString(&proto, &field, value);
+}
+
 static const NProtoBuf::EnumValueDescriptor*
 FindEnumValue(const NProtoBuf::EnumDescriptor* enumField,
               TStringBuf target, bool (*equals)(TStringBuf, TStringBuf)) {
@@ -122,7 +122,7 @@ FindEnumValue(const NProtoBuf::EnumDescriptor* enumField,
     return nullptr;
 }
 
-static void 
+static void
 JsonEnum2Field(const NJson::TJsonValue& json,
                google::protobuf::Message& proto,
                const google::protobuf::FieldDescriptor& field,
@@ -170,7 +170,7 @@ JsonEnum2Field(const NJson::TJsonValue& json,
 static void
 Json2SingleField(const NJson::TJsonValue& json,
                  google::protobuf::Message& proto,
-                 const google::protobuf::FieldDescriptor& field, 
+                 const google::protobuf::FieldDescriptor& field,
                  const NProtobufJson::TJson2ProtoConfig& config,
                  bool isMapValue = false) {
     using namespace google::protobuf;
@@ -206,7 +206,7 @@ Json2SingleField(const NJson::TJsonValue& json,
             JsonString2Field(fieldJson, proto, field, config);
             break;
         }
- 
+
         case FieldDescriptor::CPPTYPE_ENUM: {
             JsonEnum2Field(fieldJson, proto, field, config);
             break;
@@ -314,15 +314,15 @@ Json2RepeatedFieldValue(const NJson::TJsonValue& jsonValue,
 static void
 Json2RepeatedField(const NJson::TJsonValue& json,
                    google::protobuf::Message& proto,
-                   const google::protobuf::FieldDescriptor& field, 
+                   const google::protobuf::FieldDescriptor& field,
                    const NProtobufJson::TJson2ProtoConfig& config) {
     using namespace google::protobuf;
 
     TString name = GetFieldName(field, config);
-    if (!json.Has(name)) 
+    if (!json.Has(name))
         return;
 
-    const NJson::TJsonValue& fieldJson = json[name]; 
+    const NJson::TJsonValue& fieldJson = json[name];
     if (fieldJson.GetType() == NJson::JSON_UNDEFINED || fieldJson.GetType() == NJson::JSON_NULL)
         return;
 
@@ -337,7 +337,7 @@ Json2RepeatedField(const NJson::TJsonValue& json,
 
     if (fieldJson.GetType() != NJson::JSON_ARRAY && !config.MapAsObject && !config.VectorizeScalars && !config.ValueVectorizer) {
         ythrow yexception() << "JSON field doesn't represent an array for "
-                            << name 
+                            << name
                             << "(actual type is "
                             << static_cast<int>(fieldJson.GetType()) << ").";
     }
@@ -351,7 +351,7 @@ Json2RepeatedField(const NJson::TJsonValue& json,
             const TString& key = x.first;
             const NJson::TJsonValue& jsonValue = x.second;
             Json2RepeatedFieldValue(jsonValue, proto, field, config, reflection, key);
-        } 
+        }
     } else {
         if (config.ReplaceRepeatedFields) {
             reflection->ClearField(&proto, &field);

+ 9 - 9
library/cpp/protobuf/json/json2proto.h

@@ -1,8 +1,8 @@
 #pragma once
 
-#include "string_transform.h" 
+#include "string_transform.h"
 #include "name_generator.h"
- 
+
 #include <library/cpp/json/json_reader.h>
 #include <library/cpp/json/json_value.h>
 
@@ -29,25 +29,25 @@ namespace NProtobufJson {
             FieldNameSnakeCase,     // ABC -> a_b_c,    UserID -> user_i_d
             FieldNameSnakeCaseDense // ABC -> abc,      UserID -> user_id
         };
- 
+
         enum EnumValueMode {
             EnumCaseSensetive = 0, // default
             EnumCaseInsensetive,
             EnumSnakeCaseInsensitive
         };
- 
+
         TSelf& SetFieldNameMode(FldNameMode mode) {
             Y_ENSURE(mode == FieldNameOriginalCase || !UseJsonName, "FieldNameMode and UseJsonName are mutually exclusive");
             FieldNameMode = mode;
             return *this;
         }
- 
+
         TSelf& SetUseJsonName(bool jsonName) {
             Y_ENSURE(!jsonName || FieldNameMode == FieldNameOriginalCase, "FieldNameMode and UseJsonName are mutually exclusive");
             UseJsonName = jsonName;
             return *this;
         }
- 
+
         TSelf& AddStringTransform(TStringTransformPtr transform) {
             StringTransforms.push_back(transform);
             return *this;
@@ -57,7 +57,7 @@ namespace NProtobufJson {
             CastFromString = cast;
             return *this;
         }
- 
+
         TSelf& SetDoNotCastEmptyStrings(bool cast) {
             DoNotCastEmptyStrings = cast;
             return *this;
@@ -109,7 +109,7 @@ namespace NProtobufJson {
         /// Use 'json_name' protobuf option for field name, mutually exclusive
         /// with FieldNameMode.
         bool UseJsonName = false;
- 
+
         /// Transforms will be applied only to string values (== protobuf fields of string / bytes type).
         TVector<TStringTransformPtr> StringTransforms;
 
@@ -163,7 +163,7 @@ namespace NProtobufJson {
     /// @throw yexception
     void Json2Proto(const NJson::TJsonValue& json, google::protobuf::Message& proto,
                     const TJson2ProtoConfig& config = TJson2ProtoConfig());
- 
+
     /// @throw yexception
     void Json2Proto(const TStringBuf& json, google::protobuf::Message& proto,
                     const TJson2ProtoConfig& config = TJson2ProtoConfig());

+ 1 - 1
library/cpp/protobuf/json/string_transform.h

@@ -27,7 +27,7 @@ namespace NProtobufJson {
             return Transform(str);
         }
     };
- 
+
     using TStringTransformPtr = TIntrusivePtr<IStringTransform>;
 
     template <bool quote, bool tounicode>

+ 32 - 32
library/cpp/protobuf/json/ut/json2proto_ut.cpp

@@ -317,55 +317,55 @@ Y_UNIT_TEST(TestInvalidEnum) {
         UNIT_ASSERT_EXCEPTION(Json2Proto(json, proto), yexception);
     }
 }
- 
+
 Y_UNIT_TEST(TestFieldNameMode) {
     // Original case 1
     {
         TString modelStr(R"_({"String":"value"})_");
- 
+
         TFlatOptional proto;
         TJson2ProtoConfig config;
- 
+
         UNIT_ASSERT_NO_EXCEPTION(proto = Json2Proto<TFlatOptional>(modelStr, config));
         UNIT_ASSERT(proto.GetString() == "value");
     }
- 
+
     // Original case 2
     {
         TString modelStr(R"_({"String":"value"})_");
- 
+
         TFlatOptional proto;
         TJson2ProtoConfig config;
         config.FieldNameMode = TJson2ProtoConfig::FieldNameOriginalCase;
- 
+
         UNIT_ASSERT_NO_EXCEPTION(proto = Json2Proto<TFlatOptional>(modelStr, config));
         UNIT_ASSERT(proto.GetString() == "value");
     }
- 
+
     // Lowercase
     {
         TString modelStr(R"_({"string":"value"})_");
- 
+
         TFlatOptional proto;
         TJson2ProtoConfig config;
         config.FieldNameMode = TJson2ProtoConfig::FieldNameLowerCase;
- 
+
         UNIT_ASSERT_NO_EXCEPTION(proto = Json2Proto<TFlatOptional>(modelStr, config));
         UNIT_ASSERT(proto.GetString() == "value");
     }
- 
+
     // Uppercase
     {
         TString modelStr(R"_({"STRING":"value"})_");
- 
+
         TFlatOptional proto;
         TJson2ProtoConfig config;
         config.FieldNameMode = TJson2ProtoConfig::FieldNameUpperCase;
- 
+
         UNIT_ASSERT_NO_EXCEPTION(proto = Json2Proto<TFlatOptional>(modelStr, config));
         UNIT_ASSERT(proto.GetString() == "value");
     }
- 
+
     // Camelcase
     {
         TString modelStr(R"_({"string":"value"})_");
@@ -433,25 +433,25 @@ Y_UNIT_TEST(TestFieldNameMode) {
     // Original case, repeated
     {
         TString modelStr(R"_({"I32":[1,2]})_");
- 
+
         TFlatRepeated proto;
         TJson2ProtoConfig config;
         config.FieldNameMode = TJson2ProtoConfig::FieldNameOriginalCase;
- 
+
         UNIT_ASSERT_NO_EXCEPTION(proto = Json2Proto<TFlatRepeated>(modelStr, config));
         UNIT_ASSERT(proto.I32Size() == 2);
         UNIT_ASSERT(proto.GetI32(0) == 1);
         UNIT_ASSERT(proto.GetI32(1) == 2);
     }
- 
+
     // Lower case, repeated
     {
         TString modelStr(R"_({"i32":[1,2]})_");
- 
+
         TFlatRepeated proto;
         TJson2ProtoConfig config;
         config.FieldNameMode = TJson2ProtoConfig::FieldNameLowerCase;
- 
+
         UNIT_ASSERT_NO_EXCEPTION(proto = Json2Proto<TFlatRepeated>(modelStr, config));
         UNIT_ASSERT(proto.I32Size() == 2);
         UNIT_ASSERT(proto.GetI32(0) == 1);
@@ -491,7 +491,7 @@ Y_UNIT_TEST(TestFieldNameMode) {
             config.SetFieldNameMode(TJson2ProtoConfig::FieldNameLowerCase), yexception, "mutually exclusive");
     }
 } // TestFieldNameMode
- 
+
 class TStringTransform: public IStringTransform {
 public:
     int GetType() const override {
@@ -501,7 +501,7 @@ public:
         str = "transformed_any";
     }
 };
- 
+
 class TBytesTransform: public IStringTransform {
 public:
     int GetType() const override {
@@ -519,7 +519,7 @@ Y_UNIT_TEST(TestInvalidJson) {
     TFlatOptional proto;
     UNIT_ASSERT_EXCEPTION(Json2Proto(val, proto), yexception);
 }
- 
+
 Y_UNIT_TEST(TestInvalidRepeatedFieldWithMapAsObject) {
     TCompositeRepeated proto;
     TJson2ProtoConfig config;
@@ -531,37 +531,37 @@ Y_UNIT_TEST(TestStringTransforms) {
     // Check that strings and bytes are transformed
     {
         TString modelStr(R"_({"String":"value_str", "Bytes": "value_bytes"})_");
- 
+
         TFlatOptional proto;
         TJson2ProtoConfig config;
         config.AddStringTransform(new TStringTransform);
- 
+
         UNIT_ASSERT_NO_EXCEPTION(proto = Json2Proto<TFlatOptional>(modelStr, config));
         UNIT_ASSERT(proto.GetString() == "transformed_any");
         UNIT_ASSERT(proto.GetBytes() == "transformed_any");
     }
- 
+
     // Check that bytes are transformed, strings are left intact
     {
         TString modelStr(R"_({"String":"value_str", "Bytes": "value_bytes"})_");
- 
+
         TFlatOptional proto;
         TJson2ProtoConfig config;
         config.AddStringTransform(new TBytesTransform);
- 
+
         UNIT_ASSERT_NO_EXCEPTION(proto = Json2Proto<TFlatOptional>(modelStr, config));
         UNIT_ASSERT(proto.GetString() == "value_str");
         UNIT_ASSERT(proto.GetBytes() == "transformed_bytes");
     }
- 
+
     // Check that repeated bytes are transformed, repeated strings are left intact
     {
         TString modelStr(R"_({"String":["value_str", "str2"], "Bytes": ["value_bytes", "bytes2"]})_");
- 
+
         TFlatRepeated proto;
         TJson2ProtoConfig config;
         config.AddStringTransform(new TBytesTransform);
- 
+
         UNIT_ASSERT_NO_EXCEPTION(proto = Json2Proto<TFlatRepeated>(modelStr, config));
         UNIT_ASSERT(proto.StringSize() == 2);
         UNIT_ASSERT(proto.GetString(0) == "value_str");
@@ -570,15 +570,15 @@ Y_UNIT_TEST(TestStringTransforms) {
         UNIT_ASSERT(proto.GetBytes(0) == "transformed_bytes");
         UNIT_ASSERT(proto.GetBytes(1) == "transformed_bytes");
     }
- 
+
     // Check that bytes are transformed, strings are left intact in composed messages
     {
         TString modelStr(R"_({"Part": {"String":"value_str", "Bytes": "value_bytes"}})_");
- 
+
         TCompositeOptional proto;
         TJson2ProtoConfig config;
         config.AddStringTransform(new TBytesTransform);
- 
+
         UNIT_ASSERT_NO_EXCEPTION(proto = Json2Proto<TCompositeOptional>(modelStr, config));
         UNIT_ASSERT(proto.GetPart().GetString() == "value_str");
         UNIT_ASSERT(proto.GetPart().GetBytes() == "transformed_bytes");

+ 8 - 8
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
     {

Some files were not shown because too many files changed in this diff