diff options
author | ngc224 <ngc224@yandex-team.com> | 2025-01-14 11:24:26 +0300 |
---|---|---|
committer | ngc224 <ngc224@yandex-team.com> | 2025-01-14 12:04:33 +0300 |
commit | c84f9bf19d66e2e3d96a52f6f2181676ebca8a52 (patch) | |
tree | 56f350523be0552bebd86c273d9b455ee85d3720 /library/cpp/yt/string/unittests/format_ut.cpp | |
parent | 8e2a62c296736bedbbabeeb8152488d17d6452a1 (diff) | |
download | ydb-c84f9bf19d66e2e3d96a52f6f2181676ebca8a52.tar.gz |
Squeeze contiguous sequences of blocks in logging
commit_hash:5dda6f5ef324f03c99af3dae32ebf4a059f02bd3
Diffstat (limited to 'library/cpp/yt/string/unittests/format_ut.cpp')
-rw-r--r-- | library/cpp/yt/string/unittests/format_ut.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/library/cpp/yt/string/unittests/format_ut.cpp b/library/cpp/yt/string/unittests/format_ut.cpp index 5ec4a1ffa8..f783efcf11 100644 --- a/library/cpp/yt/string/unittests/format_ut.cpp +++ b/library/cpp/yt/string/unittests/format_ut.cpp @@ -246,6 +246,13 @@ TEST(TFormatTest, Tuples) EXPECT_EQ("{1, 2}", Format("%v", std::pair(1, 2))); } +TEST(TFormatTest, CompactIntervalView) +{ + EXPECT_EQ("[]", Format("%v", MakeCompactIntervalView(std::vector<int>{}))); + EXPECT_EQ("[1]", Format("%v", MakeCompactIntervalView(std::vector<int>{1}))); + EXPECT_EQ("[0, 2-4, 7]", Format("%v", MakeCompactIntervalView(std::vector<int>{0, 2, 3, 4, 7}))); +} + TEST(TFormatTest, LazyMultiValueFormatter) { int i = 1; |