diff options
author | Arslan Urtashev <urtashev@gmail.com> | 2022-02-10 16:48:55 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:55 +0300 |
commit | b97740540e7302cec9efa181e106ae1990a0cc1c (patch) | |
tree | 1a2a0bfe523c3272d207e2d75254a41d3945a3bb /library/cpp/protobuf/json/ut/proto2json_ut.cpp | |
parent | 31789673dc3562bc7540e00fe031ba84ae282c24 (diff) | |
download | ydb-b97740540e7302cec9efa181e106ae1990a0cc1c.tar.gz |
Restoring authorship annotation for Arslan Urtashev <urtashev@gmail.com>. 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 | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/library/cpp/protobuf/json/ut/proto2json_ut.cpp b/library/cpp/protobuf/json/ut/proto2json_ut.cpp index 07e52d7f2f..3e21b23371 100644 --- a/library/cpp/protobuf/json/ut/proto2json_ut.cpp +++ b/library/cpp/protobuf/json/ut/proto2json_ut.cpp @@ -75,31 +75,31 @@ Y_UNIT_TEST_SUITE(TProto2JsonFlatTest) { } Y_UNIT_TEST(TestNameGenerator) { - TNameGeneratorType proto; - proto.SetField(42); - - TProto2JsonConfig cfg; + TNameGeneratorType proto; + proto.SetField(42); + + TProto2JsonConfig cfg; cfg.SetNameGenerator([](const NProtoBuf::FieldDescriptor&) { return "42"; }); - - TStringStream str; - Proto2Json(proto, str, cfg); - - UNIT_ASSERT_STRINGS_EQUAL(R"({"42":42})", str.Str()); - } - + + TStringStream str; + Proto2Json(proto, str, cfg); + + UNIT_ASSERT_STRINGS_EQUAL(R"({"42":42})", str.Str()); + } + Y_UNIT_TEST(TestEnumValueGenerator) { - TEnumValueGeneratorType proto; - proto.SetEnum(TEnumValueGeneratorType::ENUM_42); - - TProto2JsonConfig cfg; + TEnumValueGeneratorType proto; + proto.SetEnum(TEnumValueGeneratorType::ENUM_42); + + TProto2JsonConfig cfg; cfg.SetEnumValueGenerator([](const NProtoBuf::EnumValueDescriptor&) { return "42"; }); - - TStringStream str; - Proto2Json(proto, str, cfg); - - UNIT_ASSERT_STRINGS_EQUAL(R"({"Enum":"42"})", str.Str()); - } - + + TStringStream str; + Proto2Json(proto, str, cfg); + + UNIT_ASSERT_STRINGS_EQUAL(R"({"Enum":"42"})", str.Str()); + } + Y_UNIT_TEST(TestFlatOptional){ {TFlatOptional proto; FillFlatProto(&proto); |