proxygen
|
#include <folly/Random.h>
#include <folly/ScopeGuard.h>
#include <folly/io/Cursor.h>
#include <folly/io/IOBuf.h>
#include <folly/portability/GTest.h>
#include <glog/logging.h>
#include <proxygen/lib/utils/ZlibStreamCompressor.h>
#include <proxygen/lib/utils/ZlibStreamDecompressor.h>
Go to the source code of this file.
Classes | |
class | ZlibTests |
Functions | |
std::unique_ptr< folly::IOBuf > | makeBuf (uint32_t size) |
void | verify (ZlibCompressionType type, std::unique_ptr< IOBuf > original, std::unique_ptr< IOBuf > compressed) |
void | compressThenDecompress (ZlibCompressionType type, int level, unique_ptr< IOBuf > buf) |
TEST_F (ZlibTests, CompressDecompressGzip5000) | |
TEST_F (ZlibTests, CompressDecompressGzip2000) | |
TEST_F (ZlibTests, CompressDecompressGzip1024) | |
TEST_F (ZlibTests, CompressDecompressGzip500) | |
TEST_F (ZlibTests, CompressDecompressGzip50) | |
TEST_F (ZlibTests, CompressDecompressDeflate) | |
TEST_F (ZlibTests, CompressDecompressEmpty) | |
TEST_F (ZlibTests, CompressDecompressChain) | |
TEST_F (ZlibTests, CompressDecompressStreaming) | |
TEST_F (ZlibTests, CompressDecompressSmallBuffer) | |
void compressThenDecompress | ( | ZlibCompressionType | type, |
int | level, | ||
unique_ptr< IOBuf > | buf | ||
) |
Definition at line 52 of file ZlibTests.cpp.
References ASSERT_FALSE, proxygen::ZlibStreamCompressor::compress(), proxygen::ZlibStreamCompressor::getStatus(), proxygen::ZlibStreamCompressor::hasError(), folly::gen::move, and verify().
Referenced by TEST_F().
std::unique_ptr<folly::IOBuf> makeBuf | ( | uint32_t | size | ) |
Definition at line 26 of file ZlibTests.cpp.
References folly::IOBuf::create(), folly::Random::rand32(), folly::Random::rand64(), uint64_t, uint8_t, and folly::io::detail::Writable< Derived >::write().
Referenced by TestPriorityMapBuilder::createVirtualStreams(), HTTP2FramerTest::dataFrameTest(), TestAbortPost< stage >::doAbortTest(), proxygen::fakeMockCodec(), proxygen::makeResponse(), MoveToFbStringTest::SetUp(), TEST_F(), MockCodecDownstreamTest::testConnFlowControlBlocked(), and TYPED_TEST_P().
TEST_F | ( | ZlibTests | , |
CompressDecompressGzip5000 | |||
) |
Definition at line 68 of file ZlibTests.cpp.
References ASSERT_NO_FATAL_FAILURE, compressThenDecompress(), and makeBuf().
TEST_F | ( | ZlibTests | , |
CompressDecompressGzip2000 | |||
) |
Definition at line 73 of file ZlibTests.cpp.
References ASSERT_NO_FATAL_FAILURE, compressThenDecompress(), and makeBuf().
TEST_F | ( | ZlibTests | , |
CompressDecompressGzip1024 | |||
) |
Definition at line 78 of file ZlibTests.cpp.
References ASSERT_NO_FATAL_FAILURE, compressThenDecompress(), and makeBuf().
TEST_F | ( | ZlibTests | , |
CompressDecompressGzip500 | |||
) |
Definition at line 83 of file ZlibTests.cpp.
References ASSERT_NO_FATAL_FAILURE, compressThenDecompress(), and makeBuf().
TEST_F | ( | ZlibTests | , |
CompressDecompressGzip50 | |||
) |
Definition at line 88 of file ZlibTests.cpp.
References ASSERT_NO_FATAL_FAILURE, compressThenDecompress(), and makeBuf().
TEST_F | ( | ZlibTests | , |
CompressDecompressDeflate | |||
) |
Definition at line 93 of file ZlibTests.cpp.
References ASSERT_NO_FATAL_FAILURE, compressThenDecompress(), and makeBuf().
TEST_F | ( | ZlibTests | , |
CompressDecompressEmpty | |||
) |
Definition at line 99 of file ZlibTests.cpp.
References ASSERT_NO_FATAL_FAILURE, compressThenDecompress(), and makeBuf().
TEST_F | ( | ZlibTests | , |
CompressDecompressChain | |||
) |
Definition at line 104 of file ZlibTests.cpp.
References ASSERT_NO_FATAL_FAILURE, compressThenDecompress(), makeBuf(), and folly::gen::move.
TEST_F | ( | ZlibTests | , |
CompressDecompressStreaming | |||
) |
Definition at line 114 of file ZlibTests.cpp.
References ASSERT_NO_FATAL_FAILURE, folly::IOBuf::create(), folly::empty(), folly::gen::first, makeBuf(), folly::gen::move, and verify().
TEST_F | ( | ZlibTests | , |
CompressDecompressSmallBuffer | |||
) |
Definition at line 137 of file ZlibTests.cpp.
References ASSERT_NO_FATAL_FAILURE, compressThenDecompress(), folly::gen::guard(), makeBuf(), and folly::makeGuard().
void verify | ( | ZlibCompressionType | type, |
std::unique_ptr< IOBuf > | original, | ||
std::unique_ptr< IOBuf > | compressed | ||
) |
Definition at line 40 of file ZlibTests.cpp.
References ASSERT_FALSE, ASSERT_TRUE, folly::eq, and type.
Referenced by compressThenDecompress(), and TEST_F().