aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/memory/unittests/ref_ut.cpp
blob: 8ecd57e15d200b0b5e4b436e76d9311e7c402d0d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <library/cpp/testing/gtest/gtest.h>

#include <library/cpp/testing/gtest_extensions/assertions.h>

#include <library/cpp/yt/memory/ref.h>

namespace NYT::NYson {
namespace {

////////////////////////////////////////////////////////////////////////////////

TEST(TSharedRefTest, Save)
{
    const TSharedRef expected = TSharedRef::FromString("My tests data");
    TStringStream s;
    ::Save(&s, expected);  // only Save supported for TSharedRef. You can ::Load serialized data to vector.
}

////////////////////////////////////////////////////////////////////////////////

} // namespace
} // namespace NYT::NYson