aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/protobuf/json/ut/json.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
commit9c61d3a2cac2a16341e82c613b030fcc03bf277a (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/protobuf/json/ut/json.h
parentf281aaf77179d27d6208b873e95ae6cd45765a63 (diff)
downloadydb-9c61d3a2cac2a16341e82c613b030fcc03bf277a.tar.gz
Restoring authorship annotation for <familom@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/protobuf/json/ut/json.h')
-rw-r--r--library/cpp/protobuf/json/ut/json.h50
1 files changed, 25 insertions, 25 deletions
diff --git a/library/cpp/protobuf/json/ut/json.h b/library/cpp/protobuf/json/ut/json.h
index 4f942f347b..c1f108e6e4 100644
--- a/library/cpp/protobuf/json/ut/json.h
+++ b/library/cpp/protobuf/json/ut/json.h
@@ -1,34 +1,34 @@
-#pragma once
-
+#pragma once
+
#include <library/cpp/protobuf/json/ut/test.pb.h>
-
+
#include <library/cpp/json/json_value.h>
-
-#include <cstdarg>
-
-#include <util/generic/hash_set.h>
+
+#include <cstdarg>
+
+#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 {
inline NJson::TJsonValue
CreateFlatJson(const THashSet<TString>& skippedKeys = THashSet<TString>()) {
NJson::TJsonValue json;
-
+
#define DEFINE_FIELD(name, value) \
if (skippedKeys.find(#name) == skippedKeys.end()) \
- json.InsertValue(#name, value);
-#include "fields.incl"
-#undef DEFINE_FIELD
-
+ json.InsertValue(#name, value);
+#include "fields.incl"
+#undef DEFINE_FIELD
+
return json;
}
-
+
inline NJson::TJsonValue
CreateRepeatedFlatJson(const THashSet<TString>& skippedKeys = THashSet<TString>()) {
NJson::TJsonValue json;
-
+
#define DEFINE_REPEATED_FIELD(name, type, ...) \
if (skippedKeys.find(#name) == skippedKeys.end()) { \
type values[] = {__VA_ARGS__}; \
@@ -37,22 +37,22 @@ namespace NProtobufJsonTest {
array.AppendValue(values[i]); \
} \
json.InsertValue(#name, array); \
- }
-#include "repeated_fields.incl"
-#undef DEFINE_REPEATED_FIELD
-
+ }
+#include "repeated_fields.incl"
+#undef DEFINE_REPEATED_FIELD
+
return json;
}
-
+
inline NJson::TJsonValue
CreateCompositeJson(const THashSet<TString>& skippedKeys = THashSet<TString>()) {
const NJson::TJsonValue& part = CreateFlatJson(skippedKeys);
NJson::TJsonValue json;
json.InsertValue("Part", part);
-
+
return json;
}
-
+
#define UNIT_ASSERT_JSONS_EQUAL(lhs, rhs) \
if (lhs != rhs) { \
UNIT_ASSERT_STRINGS_EQUAL(lhs.GetStringRobust(), rhs.GetStringRobust()); \