aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/scheme
diff options
context:
space:
mode:
authora-sidorin <a-sidorin@yandex-team.ru>2022-02-10 16:50:02 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:02 +0300
commit9473a88c91129dfe21343af486bebb93a0b33291 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/scheme
parent4ffc252d74adad4b93762976940ef53012cb98df (diff)
downloadydb-9473a88c91129dfe21343af486bebb93a0b33291.tar.gz
Restoring authorship annotation for <a-sidorin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/scheme')
-rw-r--r--library/cpp/scheme/domscheme_traits.h4
-rw-r--r--library/cpp/scheme/scheme.cpp4
-rw-r--r--library/cpp/scheme/tests/ut/scheme_json_ut.cpp26
3 files changed, 17 insertions, 17 deletions
diff --git a/library/cpp/scheme/domscheme_traits.h b/library/cpp/scheme/domscheme_traits.h
index c8d17a38e2..a11c4dd444 100644
--- a/library/cpp/scheme/domscheme_traits.h
+++ b/library/cpp/scheme/domscheme_traits.h
@@ -52,7 +52,7 @@ struct TSchemeTraits {
}
static inline void ArrayClear(TValueRef v) {
- v->SetArray();
+ v->SetArray();
v->ClearArray();
}
@@ -84,7 +84,7 @@ struct TSchemeTraits {
}
static inline void DictClear(TValueRef v) {
- v->SetDict();
+ v->SetDict();
v->ClearDict();
}
diff --git a/library/cpp/scheme/scheme.cpp b/library/cpp/scheme/scheme.cpp
index 1d706798a8..3efd116d4f 100644
--- a/library/cpp/scheme/scheme.cpp
+++ b/library/cpp/scheme/scheme.cpp
@@ -418,14 +418,14 @@ namespace NSc {
core.SetString(val.GetString());
break;
case NJson::JSON_ARRAY: {
- core.SetArray();
+ core.SetArray();
for (const auto& item : val.GetArray()) {
FromJsonValue(core.Push(), item);
}
break;
}
case NJson::JSON_MAP: {
- core.SetDict();
+ core.SetDict();
for (const auto& item : val.GetMap()) {
FromJsonValue(core.Add(item.first), item.second);
}
diff --git a/library/cpp/scheme/tests/ut/scheme_json_ut.cpp b/library/cpp/scheme/tests/ut/scheme_json_ut.cpp
index b8aca8058a..daeb2654f9 100644
--- a/library/cpp/scheme/tests/ut/scheme_json_ut.cpp
+++ b/library/cpp/scheme/tests/ut/scheme_json_ut.cpp
@@ -138,19 +138,19 @@ Y_UNIT_TEST_SUITE(TSchemeJsonTest) {
UNIT_ASSERT_JSON_EQ_JSON(a, b);
}
- Y_UNIT_TEST(TestJsonEmptyContainers) {
- {
- NSc::TValue a = NSc::NUt::AssertFromJson("{a:[]}");
- NSc::TValue b = NSc::TValue::FromJsonValue(a.ToJsonValue());
- UNIT_ASSERT_JSON_EQ_JSON(a, b);
- }
- {
- NSc::TValue a = NSc::NUt::AssertFromJson("{a:{}}");
- NSc::TValue b = NSc::TValue::FromJsonValue(a.ToJsonValue());
- UNIT_ASSERT_JSON_EQ_JSON(a, b);
- }
- }
-
+ Y_UNIT_TEST(TestJsonEmptyContainers) {
+ {
+ NSc::TValue a = NSc::NUt::AssertFromJson("{a:[]}");
+ NSc::TValue b = NSc::TValue::FromJsonValue(a.ToJsonValue());
+ UNIT_ASSERT_JSON_EQ_JSON(a, b);
+ }
+ {
+ NSc::TValue a = NSc::NUt::AssertFromJson("{a:{}}");
+ NSc::TValue b = NSc::TValue::FromJsonValue(a.ToJsonValue());
+ UNIT_ASSERT_JSON_EQ_JSON(a, b);
+ }
+ }
+
Y_UNIT_TEST(TestDuplicateKeys) {
const TStringBuf duplicatedKeys = "{\"a\":[{\"b\":1, \"b\":42}]}";
UNIT_ASSERT_NO_EXCEPTION(NSc::TValue::FromJsonThrow(duplicatedKeys));