diff options
author | yazevnul <yazevnul@yandex-team.ru> | 2022-02-10 16:46:48 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:48 +0300 |
commit | 9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /library/cpp/yson/node/node_ut.cpp | |
parent | 8cbc307de0221f84c80c42dcbe07d40727537e2c (diff) | |
download | ydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz |
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/yson/node/node_ut.cpp')
-rw-r--r-- | library/cpp/yson/node/node_ut.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/library/cpp/yson/node/node_ut.cpp b/library/cpp/yson/node/node_ut.cpp index f6922f7d01..448e99f575 100644 --- a/library/cpp/yson/node/node_ut.cpp +++ b/library/cpp/yson/node/node_ut.cpp @@ -8,13 +8,13 @@ using namespace NYT; template<> -void Out<NYT::TNode>(IOutputStream& s, const NYT::TNode& node) +void Out<NYT::TNode>(IOutputStream& s, const NYT::TNode& node) { s << "TNode:" << NodeToYsonString(node); } -Y_UNIT_TEST_SUITE(YtNodeTest) { - Y_UNIT_TEST(TestConstsructors) { +Y_UNIT_TEST_SUITE(YtNodeTest) { + Y_UNIT_TEST(TestConstsructors) { TNode nodeEmpty; UNIT_ASSERT_EQUAL(nodeEmpty.GetType(), TNode::Undefined); @@ -82,7 +82,7 @@ Y_UNIT_TEST_SUITE(YtNodeTest) { UNIT_ASSERT_VALUES_EQUAL(mapNode.AsMap(), expectedMapValue); } - Y_UNIT_TEST(TestNodeMap) { + Y_UNIT_TEST(TestNodeMap) { TNode nodeMap = TNode()("foo", "bar")("bar", "baz"); UNIT_ASSERT(nodeMap.IsMap()); UNIT_ASSERT_EQUAL(nodeMap.GetType(), TNode::Map); @@ -113,7 +113,7 @@ Y_UNIT_TEST_SUITE(YtNodeTest) { UNIT_ASSERT_EQUAL(copyNode["rock!!!"]["Purple"], TNode("Deep")); } - Y_UNIT_TEST(TestNodeList) { + Y_UNIT_TEST(TestNodeList) { TNode nodeList = TNode().Add("foo").Add(42).Add(3.14); UNIT_ASSERT(nodeList.IsList()); UNIT_ASSERT_EQUAL(nodeList.GetType(), TNode::List); @@ -128,7 +128,7 @@ Y_UNIT_TEST_SUITE(YtNodeTest) { UNIT_ASSERT_EQUAL(copyNode[3][1], TNode("pwd")); } - Y_UNIT_TEST(TestInsertingMethodsFromTemporaryObjects) { + Y_UNIT_TEST(TestInsertingMethodsFromTemporaryObjects) { // check that .Add(...) doesn't return lvalue reference to temporary object { const TNode& nodeList = TNode().Add(0).Add("pass").Add(0); @@ -142,7 +142,7 @@ Y_UNIT_TEST_SUITE(YtNodeTest) { } } - Y_UNIT_TEST(TestAttributes) { + Y_UNIT_TEST(TestAttributes) { TNode node = TNode()("lee", 42)("faa", 54); UNIT_ASSERT(!node.HasAttributes()); node.Attributes()("foo", true)("bar", false); @@ -185,7 +185,7 @@ Y_UNIT_TEST_SUITE(YtNodeTest) { } } - Y_UNIT_TEST(TestEq) { + Y_UNIT_TEST(TestEq) { TNode nodeNoAttributes = TNode()("lee", 42)("faa", 54); TNode node = nodeNoAttributes; node.Attributes()("foo", true)("bar", false); @@ -260,7 +260,7 @@ Y_UNIT_TEST_SUITE(YtNodeTest) { } } - Y_UNIT_TEST(TestSaveLoad) { + Y_UNIT_TEST(TestSaveLoad) { TNode node = TNode()("foo", "bar")("baz", 42); node.Attributes()["attr_name"] = "attr_value"; @@ -279,7 +279,7 @@ Y_UNIT_TEST_SUITE(YtNodeTest) { UNIT_ASSERT_VALUES_EQUAL(node, nodeCopy); } - Y_UNIT_TEST(TestIntCast) { + Y_UNIT_TEST(TestIntCast) { TNode node = 1ull << 31; UNIT_ASSERT(node.IsUint64()); UNIT_ASSERT_EXCEPTION(node.IntCast<i32>(), TNode::TTypeError); @@ -315,7 +315,7 @@ Y_UNIT_TEST_SUITE(YtNodeTest) { UNIT_ASSERT_EXCEPTION(node.IntCast<ui64>(), TNode::TTypeError); } - Y_UNIT_TEST(TestConvertToString) { + Y_UNIT_TEST(TestConvertToString) { UNIT_ASSERT_VALUES_EQUAL(TNode(5).ConvertTo<TString>(), "5"); UNIT_ASSERT_VALUES_EQUAL(TNode(123432423).ConvertTo<TString>(), "123432423"); UNIT_ASSERT_VALUES_EQUAL(TNode(123456789012345678ll).ConvertTo<TString>(), "123456789012345678"); @@ -326,7 +326,7 @@ Y_UNIT_TEST_SUITE(YtNodeTest) { UNIT_ASSERT_VALUES_EQUAL(TNode(5.3).ConvertTo<TString>(), "5.3"); } - Y_UNIT_TEST(TestConvertFromString) { + Y_UNIT_TEST(TestConvertFromString) { UNIT_ASSERT_VALUES_EQUAL(TNode("123456789012345678").ConvertTo<ui64>(), 123456789012345678ull); UNIT_ASSERT_VALUES_EQUAL(TNode("123456789012345678").ConvertTo<i64>(), 123456789012345678); UNIT_ASSERT_VALUES_EQUAL(TNode(ToString(1ull << 63)).ConvertTo<ui64>(), 1ull << 63); @@ -334,7 +334,7 @@ Y_UNIT_TEST_SUITE(YtNodeTest) { UNIT_ASSERT_VALUES_EQUAL(TNode("5.34").ConvertTo<double>(), 5.34); } - Y_UNIT_TEST(TestConvertDoubleInt) { + Y_UNIT_TEST(TestConvertDoubleInt) { UNIT_ASSERT_VALUES_EQUAL(TNode(5.3).ConvertTo<i8>(), 5); UNIT_ASSERT_VALUES_EQUAL(TNode(5.3).ConvertTo<ui8>(), 5); UNIT_ASSERT_VALUES_EQUAL(TNode(5.3).ConvertTo<i64>(), 5); @@ -372,7 +372,7 @@ Y_UNIT_TEST_SUITE(YtNodeTest) { UNIT_ASSERT_EXCEPTION(TNode(INFINITY).ConvertTo<i64>(), TNode::TTypeError); } - Y_UNIT_TEST(TestConvertToBool) { + Y_UNIT_TEST(TestConvertToBool) { UNIT_ASSERT_VALUES_EQUAL(TNode("true").ConvertTo<bool>(), true); UNIT_ASSERT_VALUES_EQUAL(TNode("TRUE").ConvertTo<bool>(), true); UNIT_ASSERT_VALUES_EQUAL(TNode("false").ConvertTo<bool>(), false); @@ -383,7 +383,7 @@ Y_UNIT_TEST_SUITE(YtNodeTest) { UNIT_ASSERT_EXCEPTION(TNode("").ConvertTo<bool>(), TFromStringException); } - Y_UNIT_TEST(TestCanonicalSerialization) { + Y_UNIT_TEST(TestCanonicalSerialization) { auto node = TNode() ("ca", "ca")("c", "c")("a", "a")("b", "b") ("bb", TNode() |