diff options
author | iddqd <iddqd@yandex-team.ru> | 2022-02-10 16:49:45 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:45 +0300 |
commit | 07fce9c5f7771600d0b3d70e1f88fd8a7e164d85 (patch) | |
tree | e4aa4750fbb864d70f8c06cf03d2750e979ea3bf /library/cpp/protobuf/json | |
parent | af42068bf6cd93c976b80dd0388fa48cdf65da11 (diff) | |
download | ydb-07fce9c5f7771600d0b3d70e1f88fd8a7e164d85.tar.gz |
Restoring authorship annotation for <iddqd@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/protobuf/json')
-rw-r--r-- | library/cpp/protobuf/json/proto2json.h | 2 | ||||
-rw-r--r-- | library/cpp/protobuf/json/ut/proto2json_ut.cpp | 18 | ||||
-rw-r--r-- | library/cpp/protobuf/json/ut/test.proto | 46 |
3 files changed, 33 insertions, 33 deletions
diff --git a/library/cpp/protobuf/json/proto2json.h b/library/cpp/protobuf/json/proto2json.h index 89a1781a40..71daeeb4ab 100644 --- a/library/cpp/protobuf/json/proto2json.h +++ b/library/cpp/protobuf/json/proto2json.h @@ -9,7 +9,7 @@ #include <util/generic/fwd.h> #include <util/generic/vector.h> -#include <util/generic/yexception.h> +#include <util/generic/yexception.h> #include <util/stream/str.h> #include <functional> diff --git a/library/cpp/protobuf/json/ut/proto2json_ut.cpp b/library/cpp/protobuf/json/ut/proto2json_ut.cpp index 07e52d7f2f..0a2f5652c0 100644 --- a/library/cpp/protobuf/json/ut/proto2json_ut.cpp +++ b/library/cpp/protobuf/json/ut/proto2json_ut.cpp @@ -27,12 +27,12 @@ using namespace NProtobufJsonTest; Y_UNIT_TEST_SUITE(TProto2JsonFlatTest) { Y_UNIT_TEST(TestFlatDefault) { - using namespace ::google::protobuf; - TFlatDefault proto; - NJson::TJsonValue json; - TProto2JsonConfig cfg; - cfg.SetMissingSingleKeyMode(TProto2JsonConfig::MissingKeyDefault); - UNIT_ASSERT_NO_EXCEPTION(Proto2Json(proto, json, cfg)); + using namespace ::google::protobuf; + TFlatDefault proto; + NJson::TJsonValue json; + TProto2JsonConfig cfg; + cfg.SetMissingSingleKeyMode(TProto2JsonConfig::MissingKeyDefault); + UNIT_ASSERT_NO_EXCEPTION(Proto2Json(proto, json, cfg)); #define DEFINE_FIELD(name, value) \ { \ auto descr = proto.GetMetadata().descriptor->FindFieldByName(#name); \ @@ -71,9 +71,9 @@ Y_UNIT_TEST_SUITE(TProto2JsonFlatTest) { } \ } #include <library/cpp/protobuf/json/ut/fields.incl> -#undef DEFINE_FIELD - } - +#undef DEFINE_FIELD + } + Y_UNIT_TEST(TestNameGenerator) { TNameGeneratorType proto; proto.SetField(42); diff --git a/library/cpp/protobuf/json/ut/test.proto b/library/cpp/protobuf/json/ut/test.proto index 0fa996fd41..0a207232c6 100644 --- a/library/cpp/protobuf/json/ut/test.proto +++ b/library/cpp/protobuf/json/ut/test.proto @@ -91,34 +91,34 @@ message TFlatRepeated { repeated string UserID = 20; }; -message TFlatDefault { - optional int32 I32 = 1 [default = 132]; - optional int64 I64 = 2 [default = 164]; - optional uint32 UI32 = 3 [default = 232]; - optional uint64 UI64 = 4 [default = 264]; - optional sint32 SI32 = 5 [default = 332]; - optional sint64 SI64 = 6 [default = 364]; - optional fixed32 FI32 = 7 [default = 432]; - optional fixed64 FI64 = 8 [default = 464]; - optional sfixed32 SFI32 = 9 [default = 532]; - optional sfixed64 SFI64 = 10 [default = 564]; - - optional bool Bool = 11 [default = true]; - - optional string String = 12 [default = "string"]; - optional bytes Bytes = 13 [default = "bytes"]; - - optional EEnum Enum = 14 [default = E_2]; - - optional float Float = 15 [default = 0.123]; - optional double Double = 16 [default = 0.456]; +message TFlatDefault { + optional int32 I32 = 1 [default = 132]; + optional int64 I64 = 2 [default = 164]; + optional uint32 UI32 = 3 [default = 232]; + optional uint64 UI64 = 4 [default = 264]; + optional sint32 SI32 = 5 [default = 332]; + optional sint64 SI64 = 6 [default = 364]; + optional fixed32 FI32 = 7 [default = 432]; + optional fixed64 FI64 = 8 [default = 464]; + optional sfixed32 SFI32 = 9 [default = 532]; + optional sfixed64 SFI64 = 10 [default = 564]; + + optional bool Bool = 11 [default = true]; + + optional string String = 12 [default = "string"]; + optional bytes Bytes = 13 [default = "bytes"]; + + optional EEnum Enum = 14 [default = E_2]; + + optional float Float = 15 [default = 0.123]; + optional double Double = 16 [default = 0.456]; optional string OneString = 17 [default = "string"]; optional string OneTwoString = 18 [default = "string"]; optional string ABC = 19 [default = "abc"]; optional string UserID = 20 [default = "some_id"]; -}; - +}; + message TCompositeOptional { optional TFlatOptional Part = 1; }; |