diff options
author | mvel <mvel@yandex-team.ru> | 2022-02-10 16:45:41 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:41 +0300 |
commit | 43f5a35593ebc9f6bcea619bb170394ea7ae468e (patch) | |
tree | e98df59de24d2ef7c77baed9f41e4875a2fef972 /library/cpp/blockcodecs/codecs_ut.cpp | |
parent | bd30392c4cc92487950adc375c07adf52da1d592 (diff) | |
download | ydb-43f5a35593ebc9f6bcea619bb170394ea7ae468e.tar.gz |
Restoring authorship annotation for <mvel@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/blockcodecs/codecs_ut.cpp')
-rw-r--r-- | library/cpp/blockcodecs/codecs_ut.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/library/cpp/blockcodecs/codecs_ut.cpp b/library/cpp/blockcodecs/codecs_ut.cpp index f9e876327b..bfe5a23690 100644 --- a/library/cpp/blockcodecs/codecs_ut.cpp +++ b/library/cpp/blockcodecs/codecs_ut.cpp @@ -269,27 +269,27 @@ Y_UNIT_TEST_SUITE(TBlockCodecsTest) { Y_UNIT_TEST(TestStreams19) { TestStreams(20, 19); } - - Y_UNIT_TEST(TestMaxPossibleDecompressedSize) { - - UNIT_ASSERT_VALUES_EQUAL(GetMaxPossibleDecompressedLength(), Max<size_t>()); - - TVector<char> input(10001, ' '); - TCodecList codecs = ListAllCodecs(); - SetMaxPossibleDecompressedLength(10000); - - for (const auto& codec : codecs) { - const ICodec* c = Codec(codec); - TBuffer inputBuffer(input.data(), input.size()); - TBuffer output; - TBuffer decompressed; - c->Encode(inputBuffer, output); - UNIT_ASSERT_EXCEPTION(c->Decode(output, decompressed), yexception); - } - - // restore status quo - SetMaxPossibleDecompressedLength(Max<size_t>()); - } + + Y_UNIT_TEST(TestMaxPossibleDecompressedSize) { + + UNIT_ASSERT_VALUES_EQUAL(GetMaxPossibleDecompressedLength(), Max<size_t>()); + + TVector<char> input(10001, ' '); + TCodecList codecs = ListAllCodecs(); + SetMaxPossibleDecompressedLength(10000); + + for (const auto& codec : codecs) { + const ICodec* c = Codec(codec); + TBuffer inputBuffer(input.data(), input.size()); + TBuffer output; + TBuffer decompressed; + c->Encode(inputBuffer, output); + UNIT_ASSERT_EXCEPTION(c->Decode(output, decompressed), yexception); + } + + // restore status quo + SetMaxPossibleDecompressedLength(Max<size_t>()); + } Y_UNIT_TEST(TestListAllCodecs) { static const TString ALL_CODECS = |