diff options
author | mowgli <mowgli@yandex-team.ru> | 2022-02-10 16:49:25 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:25 +0300 |
commit | 89afbbe4ca0e02e386dd4df08f7945f190dc1b84 (patch) | |
tree | c4772201af6215d48734691b8796e4cfc77c2ac8 /library/cpp/streams/lz/lz_ut.cpp | |
parent | 7510cec1516d17cbc8d7749974e36aa45f547a26 (diff) | |
download | ydb-89afbbe4ca0e02e386dd4df08f7945f190dc1b84.tar.gz |
Restoring authorship annotation for <mowgli@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/streams/lz/lz_ut.cpp')
-rw-r--r-- | library/cpp/streams/lz/lz_ut.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/library/cpp/streams/lz/lz_ut.cpp b/library/cpp/streams/lz/lz_ut.cpp index 6876f070fc..f2d91e2299 100644 --- a/library/cpp/streams/lz/lz_ut.cpp +++ b/library/cpp/streams/lz/lz_ut.cpp @@ -166,28 +166,28 @@ public: : Slave_(OpenLzDecompressor(input).Release()) { } - + private: size_t DoRead(void* buf, size_t len) override { return Slave_->Read(buf, len); } - + private: THolder<IInputStream> Slave_; -}; - -template <class C> -static inline void TestMixedDecompress() { - TestCompress<C>(); - TestDecompress<TMixedDecompress>(); -} - -template <class D, class C> -static inline void TestDecompressError() { - TestCompress<C>(); - UNIT_ASSERT_EXCEPTION(TestDecompress<D>(), TDecompressorError); -} - +}; + +template <class C> +static inline void TestMixedDecompress() { + TestCompress<C>(); + TestDecompress<TMixedDecompress>(); +} + +template <class D, class C> +static inline void TestDecompressError() { + TestCompress<C>(); + UNIT_ASSERT_EXCEPTION(TestDecompress<D>(), TDecompressorError); +} + Y_UNIT_TEST_SUITE(TLzTest) { Y_UNIT_TEST(TestLzo) { TestCompress<TLzoCompress>(); @@ -243,23 +243,23 @@ Y_UNIT_TEST_SUITE(TLzTest) { TestCompress<TSnappyCompress>(); TestDecompress<TSnappyDecompress>(); } - + Y_UNIT_TEST(TestGeneric) { - TestMixedDecompress<TLzoCompress>(); - TestMixedDecompress<TLzfCompress>(); - TestMixedDecompress<TLzqCompress>(); - TestMixedDecompress<TLz4Compress>(); - TestMixedDecompress<TSnappyCompress>(); - } - + TestMixedDecompress<TLzoCompress>(); + TestMixedDecompress<TLzfCompress>(); + TestMixedDecompress<TLzqCompress>(); + TestMixedDecompress<TLz4Compress>(); + TestMixedDecompress<TSnappyCompress>(); + } + Y_UNIT_TEST(TestDecompressorError) { - TestDecompressError<TLzoDecompress, TLzfCompress>(); - TestDecompressError<TLzfDecompress, TLzqCompress>(); - TestDecompressError<TLzqDecompress, TLz4Compress>(); - TestDecompressError<TLz4Decompress, TSnappyCompress>(); - TestDecompressError<TSnappyDecompress, TBufferedOutput>(); - TestDecompressError<TMixedDecompress, TBufferedOutput>(); - } + TestDecompressError<TLzoDecompress, TLzfCompress>(); + TestDecompressError<TLzfDecompress, TLzqCompress>(); + TestDecompressError<TLzqDecompress, TLz4Compress>(); + TestDecompressError<TLz4Decompress, TSnappyCompress>(); + TestDecompressError<TSnappyDecompress, TBufferedOutput>(); + TestDecompressError<TMixedDecompress, TBufferedOutput>(); + } Y_UNIT_TEST(TestFactory) { TStringStream ss; |