diff options
author | Vasily Gerasimov <UgnineSirdis@gmail.com> | 2022-02-10 16:49:09 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:09 +0300 |
commit | 6cdc8f140213c595e4ad38bc3d97fcef1146b8c3 (patch) | |
tree | f69637041e6fed76ebae0c74ae1fa0c4be6ab5b4 /library/cpp/scheme/tests/ut | |
parent | e5d4696304c6689379ac7ce334512404d4b7836c (diff) | |
download | ydb-6cdc8f140213c595e4ad38bc3d97fcef1146b8c3.tar.gz |
Restoring authorship annotation for Vasily Gerasimov <UgnineSirdis@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/scheme/tests/ut')
-rw-r--r-- | library/cpp/scheme/tests/ut/scheme_json_ut.cpp | 12 | ||||
-rw-r--r-- | library/cpp/scheme/tests/ut/scheme_ut.cpp | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/library/cpp/scheme/tests/ut/scheme_json_ut.cpp b/library/cpp/scheme/tests/ut/scheme_json_ut.cpp index daeb2654f9..37d635238e 100644 --- a/library/cpp/scheme/tests/ut/scheme_json_ut.cpp +++ b/library/cpp/scheme/tests/ut/scheme_json_ut.cpp @@ -137,7 +137,7 @@ Y_UNIT_TEST_SUITE(TSchemeJsonTest) { 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:[]}"); @@ -153,9 +153,9 @@ Y_UNIT_TEST_SUITE(TSchemeJsonTest) { Y_UNIT_TEST(TestDuplicateKeys) { const TStringBuf duplicatedKeys = "{\"a\":[{\"b\":1, \"b\":42}]}"; - UNIT_ASSERT_NO_EXCEPTION(NSc::TValue::FromJsonThrow(duplicatedKeys)); - UNIT_ASSERT_EXCEPTION(NSc::TValue::FromJsonThrow(duplicatedKeys, NSc::TValue::JO_PARSER_DISALLOW_DUPLICATE_KEYS), yexception); - UNIT_ASSERT(NSc::TValue::FromJson(duplicatedKeys).IsDict()); - UNIT_ASSERT(NSc::TValue::FromJson(duplicatedKeys, NSc::TValue::JO_PARSER_DISALLOW_DUPLICATE_KEYS).IsNull()); - } + UNIT_ASSERT_NO_EXCEPTION(NSc::TValue::FromJsonThrow(duplicatedKeys)); + UNIT_ASSERT_EXCEPTION(NSc::TValue::FromJsonThrow(duplicatedKeys, NSc::TValue::JO_PARSER_DISALLOW_DUPLICATE_KEYS), yexception); + UNIT_ASSERT(NSc::TValue::FromJson(duplicatedKeys).IsDict()); + UNIT_ASSERT(NSc::TValue::FromJson(duplicatedKeys, NSc::TValue::JO_PARSER_DISALLOW_DUPLICATE_KEYS).IsNull()); + } }; diff --git a/library/cpp/scheme/tests/ut/scheme_ut.cpp b/library/cpp/scheme/tests/ut/scheme_ut.cpp index 1a5d07c31b..20fe460948 100644 --- a/library/cpp/scheme/tests/ut/scheme_ut.cpp +++ b/library/cpp/scheme/tests/ut/scheme_ut.cpp @@ -863,17 +863,17 @@ Y_UNIT_TEST_SUITE(TSchemeTest) { } Y_UNIT_TEST(TestGetNoAdd) { - NSc::TValue v = NSc::NUt::AssertFromJson("{a:[null,-1,2,3.4],b:3,c:{d:5}}"); + NSc::TValue v = NSc::NUt::AssertFromJson("{a:[null,-1,2,3.4],b:3,c:{d:5}}"); UNIT_ASSERT(v.GetNoAdd("a") != nullptr); UNIT_ASSERT(v.GetNoAdd("b") != nullptr); UNIT_ASSERT(v.GetNoAdd("c") != nullptr); UNIT_ASSERT(v.GetNoAdd("d") == nullptr); UNIT_ASSERT(v.GetNoAdd("value") == nullptr); - + NSc::TValue* child = v.GetNoAdd("c"); UNIT_ASSERT(child != nullptr); (*child)["e"]["f"] = 42; - const NSc::TValue expectedResult = NSc::NUt::AssertFromJson("{a:[null,-1,2,3.4],b:3,c:{d:5,e:{f:42}}}"); - UNIT_ASSERT_VALUES_EQUAL(v, expectedResult); - } + const NSc::TValue expectedResult = NSc::NUt::AssertFromJson("{a:[null,-1,2,3.4],b:3,c:{d:5,e:{f:42}}}"); + UNIT_ASSERT_VALUES_EQUAL(v, expectedResult); + } }; |