aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/protobuf/json/ut/proto.h
diff options
context:
space:
mode:
authorfamilom <familom@yandex-team.ru>2022-02-10 16:49:49 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:49 +0300
commitf281aaf77179d27d6208b873e95ae6cd45765a63 (patch)
treeb4229c6ece98c855bd9821ef0b656042c29a8953 /library/cpp/protobuf/json/ut/proto.h
parent53d07fb9e28d179add32cd299c9341bf8a231a31 (diff)
downloadydb-f281aaf77179d27d6208b873e95ae6cd45765a63.tar.gz
Restoring authorship annotation for <familom@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/protobuf/json/ut/proto.h')
-rw-r--r--library/cpp/protobuf/json/ut/proto.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/library/cpp/protobuf/json/ut/proto.h b/library/cpp/protobuf/json/ut/proto.h
index 8183bfc8e1..db27ed52c7 100644
--- a/library/cpp/protobuf/json/ut/proto.h
+++ b/library/cpp/protobuf/json/ut/proto.h
@@ -1,11 +1,11 @@
-#pragma once
-
-#include <util/generic/hash_set.h>
+#pragma once
+
+#include <util/generic/hash_set.h>
#include <util/generic/string.h>
-
-#include <util/system/defaults.h>
-
-namespace NProtobufJsonTest {
+
+#include <util/system/defaults.h>
+
+namespace NProtobufJsonTest {
template <typename TProto>
inline void
FillFlatProto(TProto* proto,
@@ -14,20 +14,20 @@ namespace NProtobufJsonTest {
if (skippedFields.find(#name) == skippedFields.end()) \
proto->Set##name(value);
#include <library/cpp/protobuf/json/ut/fields.incl>
-#undef DEFINE_FIELD
+#undef DEFINE_FIELD
}
-
+
template <typename TRepeatedField, typename TValue>
inline void
AddValue(TRepeatedField* field, TValue value) {
field->Add(value);
}
-
+
inline void
AddValue(google::protobuf::RepeatedPtrField<TString>* field, const TString& value) {
*(field->Add()) = value;
}
-
+
inline void
FillRepeatedProto(TFlatRepeated* proto,
const THashSet<TString>& skippedFields = THashSet<TString>()) {
@@ -37,17 +37,17 @@ namespace NProtobufJsonTest {
for (size_t i = 0, end = Y_ARRAY_SIZE(values); i < end; ++i) { \
AddValue(proto->Mutable##name(), values[i]); \
} \
- }
+ }
#include <library/cpp/protobuf/json/ut/repeated_fields.incl>
-#undef DEFINE_REPEATED_FIELD
+#undef DEFINE_REPEATED_FIELD
}
-
+
template <typename TProto>
inline void
FillCompositeProto(TProto* proto, const THashSet<TString>& skippedFields = THashSet<TString>()) {
FillFlatProto(proto->MutablePart(), skippedFields);
}
-
+
#define UNIT_ASSERT_PROTOS_EQUAL(lhs, rhs) \
do { \
if (lhs.SerializeAsString() != rhs.SerializeAsString()) { \
@@ -58,5 +58,5 @@ namespace NProtobufJsonTest {
UNIT_ASSERT_STRINGS_EQUAL(lhs.SerializeAsString(), rhs.SerializeAsString()); \
} \
} while (false);
-
+
}