aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/protobuf/json/ut/json2proto_ut.cpp
diff options
context:
space:
mode:
authorlevanov <levanov@yandex-team.ru>2022-02-10 16:50:35 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:35 +0300
commite286bb0ae13ace8f8efe6aa628c5e1e67708e32e (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/protobuf/json/ut/json2proto_ut.cpp
parent45c5374f026a836b0b16ea2d9246c8385d371ca7 (diff)
downloadydb-e286bb0ae13ace8f8efe6aa628c5e1e67708e32e.tar.gz
Restoring authorship annotation for <levanov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/protobuf/json/ut/json2proto_ut.cpp')
-rw-r--r--library/cpp/protobuf/json/ut/json2proto_ut.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/library/cpp/protobuf/json/ut/json2proto_ut.cpp b/library/cpp/protobuf/json/ut/json2proto_ut.cpp
index 849c603a2e..0dfe57bc7a 100644
--- a/library/cpp/protobuf/json/ut/json2proto_ut.cpp
+++ b/library/cpp/protobuf/json/ut/json2proto_ut.cpp
@@ -56,7 +56,7 @@ namespace {
return buf.WriteJsonValue(&json).Str();
}
- void TestComplexMapAsObject(std::function<void(TComplexMapType&)>&& init, const TString& json, const TJson2ProtoConfig& config = TJson2ProtoConfig().SetMapAsObject(true)) {
+ void TestComplexMapAsObject(std::function<void(TComplexMapType&)>&& init, const TString& json, const TJson2ProtoConfig& config = TJson2ProtoConfig().SetMapAsObject(true)) {
TComplexMapType modelProto;
init(modelProto);
@@ -902,32 +902,32 @@ Y_UNIT_TEST(TestComplexMapAsObject_Enum) {
R"_({"Enum":{"key1":1,"key2":2,"key3":3}})_");
} // TestComplexMapAsObject_Enum
-Y_UNIT_TEST(TestComplexMapAsObject_EnumString) {
- TestComplexMapAsObject(
- [](TComplexMapType& proto) {
- auto& items = *proto.MutableEnum();
- items["key1"] = EEnum::E_1;
- items["key2"] = EEnum::E_2;
- items["key3"] = EEnum::E_3;
- },
- R"_({"Enum":{"key1":"E_1","key2":"E_2","key3":"E_3"}})_");
-} // TestComplexMapAsObject_EnumString
-
-Y_UNIT_TEST(TestComplexMapAsObject_EnumStringCaseInsensetive) {
- TestComplexMapAsObject(
- [](TComplexMapType& proto) {
- auto& items = *proto.MutableEnum();
- items["key1"] = EEnum::E_1;
- items["key2"] = EEnum::E_2;
- items["key3"] = EEnum::E_3;
- },
- R"_({"Enum":{"key1":"e_1","key2":"E_2","key3":"e_3"}})_",
- TJson2ProtoConfig()
- .SetMapAsObject(true)
- .SetEnumValueMode(NProtobufJson::TJson2ProtoConfig::EnumCaseInsensetive)
- );
-} // TestComplexMapAsObject_EnumStringCaseInsensetive
-
+Y_UNIT_TEST(TestComplexMapAsObject_EnumString) {
+ TestComplexMapAsObject(
+ [](TComplexMapType& proto) {
+ auto& items = *proto.MutableEnum();
+ items["key1"] = EEnum::E_1;
+ items["key2"] = EEnum::E_2;
+ items["key3"] = EEnum::E_3;
+ },
+ R"_({"Enum":{"key1":"E_1","key2":"E_2","key3":"E_3"}})_");
+} // TestComplexMapAsObject_EnumString
+
+Y_UNIT_TEST(TestComplexMapAsObject_EnumStringCaseInsensetive) {
+ TestComplexMapAsObject(
+ [](TComplexMapType& proto) {
+ auto& items = *proto.MutableEnum();
+ items["key1"] = EEnum::E_1;
+ items["key2"] = EEnum::E_2;
+ items["key3"] = EEnum::E_3;
+ },
+ R"_({"Enum":{"key1":"e_1","key2":"E_2","key3":"e_3"}})_",
+ TJson2ProtoConfig()
+ .SetMapAsObject(true)
+ .SetEnumValueMode(NProtobufJson::TJson2ProtoConfig::EnumCaseInsensetive)
+ );
+} // TestComplexMapAsObject_EnumStringCaseInsensetive
+
Y_UNIT_TEST(TestComplexMapAsObject_EnumStringSnakeCaseInsensitive) {
TestComplexMapAsObject(
[](TComplexMapType& proto) {