aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/protobuf/util/walk_ut.cpp
diff options
context:
space:
mode:
authorsvkrasnov <svkrasnov@yandex-team.ru>2022-02-10 16:50:36 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:36 +0300
commit16dee8c560e5d85ff488841421cc9e2bff3da817 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/protobuf/util/walk_ut.cpp
parentf844999843f80df761f7bbd58b0d2ca479f2dd32 (diff)
downloadydb-16dee8c560e5d85ff488841421cc9e2bff3da817.tar.gz
Restoring authorship annotation for <svkrasnov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/protobuf/util/walk_ut.cpp')
-rw-r--r--library/cpp/protobuf/util/walk_ut.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/library/cpp/protobuf/util/walk_ut.cpp b/library/cpp/protobuf/util/walk_ut.cpp
index 76b833325b..2ea6071b17 100644
--- a/library/cpp/protobuf/util/walk_ut.cpp
+++ b/library/cpp/protobuf/util/walk_ut.cpp
@@ -51,17 +51,17 @@ Y_UNIT_TEST_SUITE(ProtobufWalk) {
return true;
}
- struct TestStruct {
- bool Ok = false;
-
- TestStruct() = default;
- bool operator()(Message&, const FieldDescriptor*) {
- Ok = true;
- return false;
- }
- };
-
- Y_UNIT_TEST(TestWalkRefl) {
+ struct TestStruct {
+ bool Ok = false;
+
+ TestStruct() = default;
+ bool operator()(Message&, const FieldDescriptor*) {
+ Ok = true;
+ return false;
+ }
+ };
+
+ Y_UNIT_TEST(TestWalkRefl) {
NProtobufUtilUt::TWalkTest p;
InitProto(p);
@@ -123,36 +123,36 @@ Y_UNIT_TEST_SUITE(ProtobufWalk) {
UNIT_ASSERT(p.RepSubSize() == 2);
}
}
-
- Y_UNIT_TEST(TestMutableCallable) {
- TestStruct testStruct;
- NProtobufUtilUt::TWalkTest p;
- InitProto(p);
-
- WalkReflection(p, testStruct);
- UNIT_ASSERT(testStruct.Ok);
- }
-
- Y_UNIT_TEST(TestWalkDescr) {
- NProtobufUtilUt::TWalkTestCyclic p;
-
- TStringBuilder printedSchema;
- auto func = [&](const FieldDescriptor* desc) mutable {
- printedSchema << desc->DebugString();
- return true;
- };
- WalkSchema(p.GetDescriptor(), func);
-
- TString schema =
- "optional .NProtobufUtilUt.TWalkTestCyclic.TNested OptNested = 1;\n"
- "optional uint32 OptInt32 = 1;\n"
- "optional .NProtobufUtilUt.TWalkTestCyclic OptSubNested = 2;\n"
- "repeated string RepStr = 3;\n"
- "optional .NProtobufUtilUt.TWalkTestCyclic.TNested OptNested = 4;\n"
- "repeated uint64 OptInt64 = 2;\n"
- "optional .NProtobufUtilUt.TWalkTestCyclic OptSub = 3;\n"
- "optional .NProtobufUtilUt.TWalkTestCyclic.TEnum OptEnum = 4;\n";
-
- UNIT_ASSERT_STRINGS_EQUAL(printedSchema, schema);
- }
+
+ Y_UNIT_TEST(TestMutableCallable) {
+ TestStruct testStruct;
+ NProtobufUtilUt::TWalkTest p;
+ InitProto(p);
+
+ WalkReflection(p, testStruct);
+ UNIT_ASSERT(testStruct.Ok);
+ }
+
+ Y_UNIT_TEST(TestWalkDescr) {
+ NProtobufUtilUt::TWalkTestCyclic p;
+
+ TStringBuilder printedSchema;
+ auto func = [&](const FieldDescriptor* desc) mutable {
+ printedSchema << desc->DebugString();
+ return true;
+ };
+ WalkSchema(p.GetDescriptor(), func);
+
+ TString schema =
+ "optional .NProtobufUtilUt.TWalkTestCyclic.TNested OptNested = 1;\n"
+ "optional uint32 OptInt32 = 1;\n"
+ "optional .NProtobufUtilUt.TWalkTestCyclic OptSubNested = 2;\n"
+ "repeated string RepStr = 3;\n"
+ "optional .NProtobufUtilUt.TWalkTestCyclic.TNested OptNested = 4;\n"
+ "repeated uint64 OptInt64 = 2;\n"
+ "optional .NProtobufUtilUt.TWalkTestCyclic OptSub = 3;\n"
+ "optional .NProtobufUtilUt.TWalkTestCyclic.TEnum OptEnum = 4;\n";
+
+ UNIT_ASSERT_STRINGS_EQUAL(printedSchema, schema);
+ }
}