|
proxygen
|
#include <folly/Range.h>#include <folly/io/Cursor.h>#include <folly/io/IOBuf.h>#include <glog/logging.h>#include <folly/portability/GTest.h>#include <proxygen/lib/http/codec/compress/HPACKCodec.h>#include <proxygen/lib/http/codec/compress/HPACKQueue.h>#include <proxygen/lib/http/codec/compress/Header.h>#include <proxygen/lib/http/codec/compress/HeaderCodec.h>#include <proxygen/lib/http/codec/compress/test/TestStreamingCallback.h>#include <proxygen/lib/http/codec/compress/test/TestUtil.h>#include <vector>Go to the source code of this file.
Classes | |
| class | HPACKCodecTests |
| class | HPACKQueueTests |
Functions | |
| bool | isLowercase (StringPiece str) |
| TEST_F (HPACKCodecTests, Request) | |
| TEST_F (HPACKCodecTests, Response) | |
| TEST_F (HPACKCodecTests, Headroom) | |
| TEST_F (HPACKCodecTests, LowercasingHeaderNames) | |
| TEST_F (HPACKCodecTests, MultivalueHeaders) | |
| TEST_F (HPACKCodecTests, DecodeError) | |
| TEST_F (HPACKCodecTests, HeaderCodecStats) | |
| TEST_F (HPACKCodecTests, UncompressedSizeLimit) | |
| TEST_F (HPACKCodecTests, SizeLimitStats) | |
| TEST_F (HPACKCodecTests, DefaultHeaderIndexingStrategy) | |
| TEST_F (HPACKQueueTests, QueueInline) | |
| TEST_F (HPACKQueueTests, QueueReorder) | |
| TEST_F (HPACKQueueTests, QueueReorderOoo) | |
| TEST_F (HPACKQueueTests, QueueError) | |
| TEST_P (HPACKQueueTests, QueueDeleted) | |
| INSTANTIATE_TEST_CASE_P (Queue, HPACKQueueTests,::testing::Values(0, 1, 2, 3)) | |
| INSTANTIATE_TEST_CASE_P | ( | Queue | , |
| HPACKQueueTests | , | ||
| ::testing::Values(0, 1, 2, 3) | |||
| ) |
Referenced by TEST_P().
| bool isLowercase | ( | StringPiece | str | ) |
Definition at line 31 of file HPACKCodecTests.cpp.
References c, ch, codec, folly::IOBuf::computeChainDataLength(), fizz::decode(), proxygen::HPACKCodec::decodeStreaming(), proxygen::HPACKCodec::encode(), encodeDecode(), proxygen::ERROR, proxygen::TestStreamingCallback::error, proxygen::TestStreamingCallback::getResult(), proxygen::TestStreamingCallback::hasError(), folly::makeUnexpected(), folly::gen::move, folly::pushmi::__adl::noexcept(), uint32_t, and uint64_t.
Referenced by TEST_F().
| TEST_F | ( | HPACKCodecTests | , |
| Request | |||
| ) |
Definition at line 83 of file HPACKCodecTests.cpp.
References proxygen::hpack::basicHeaders(), encodeDecode(), EXPECT_EQ, EXPECT_TRUE, and i.
| TEST_F | ( | HPACKCodecTests | , |
| Response | |||
| ) |
Definition at line 91 of file HPACKCodecTests.cpp.
References proxygen::hpack::basicHeaders(), encodeDecode(), EXPECT_EQ, EXPECT_TRUE, proxygen::hpack::headersFromArray(), and i.
| TEST_F | ( | HPACKCodecTests | , |
| Headroom | |||
| ) |
Definition at line 106 of file HPACKCodecTests.cpp.
References proxygen::hpack::basicHeaders(), fizz::decode(), EXPECT_EQ, EXPECT_TRUE, folly::IOBuf::headroom(), and uint32_t.
| TEST_F | ( | HPACKCodecTests | , |
| LowercasingHeaderNames | |||
| ) |
makes sure that the encoder will lowercase the header names
Definition at line 122 of file HPACKCodecTests.cpp.
References encodeDecode(), EXPECT_TRUE, proxygen::hpack::headersFromArray(), i, and isLowercase().
| TEST_F | ( | HPACKCodecTests | , |
| MultivalueHeaders | |||
| ) |
make sure we mark multi-valued headers appropriately, as expected by the SPDY codec.
Definition at line 141 of file HPACKCodecTests.cpp.
References count, encodeDecode(), EXPECT_EQ, EXPECT_TRUE, proxygen::hpack::headersFromArray(), i, and uint32_t.
| TEST_F | ( | HPACKCodecTests | , |
| DecodeError | |||
| ) |
test that we're propagating the error correctly in the decoder
Definition at line 164 of file HPACKCodecTests.cpp.
References fizz::decode(), EXPECT_EQ, EXPECT_TRUE, proxygen::hpack::headersFromArray(), and folly::IOBuf::writableData().
| TEST_F | ( | HPACKCodecTests | , |
| HeaderCodecStats | |||
| ) |
testing that we're calling the stats callbacks appropriately
Definition at line 187 of file HPACKCodecTests.cpp.
References fizz::decode(), proxygen::hpack::TestHeaderCodecStats::decodedBytesCompr, proxygen::hpack::TestHeaderCodecStats::decodedBytesUncompr, proxygen::hpack::TestHeaderCodecStats::decodes, proxygen::hpack::TestHeaderCodecStats::encodedBytesCompr, proxygen::hpack::TestHeaderCodecStats::encodedBytesUncompr, proxygen::hpack::TestHeaderCodecStats::encodes, proxygen::hpack::TestHeaderCodecStats::errors, EXPECT_EQ, EXPECT_GT, EXPECT_TRUE, proxygen::hpack::headersFromArray(), and proxygen::hpack::TestHeaderCodecStats::reset().
| TEST_F | ( | HPACKCodecTests | , |
| UncompressedSizeLimit | |||
| ) |
check that we're enforcing the limit on total uncompressed size
Definition at line 228 of file HPACKCodecTests.cpp.
References encodeDecode(), EXPECT_EQ, EXPECT_TRUE, proxygen::hpack::headersFromArray(), i, and folly::value().
| TEST_F | ( | HPACKCodecTests | , |
| SizeLimitStats | |||
| ) |
Size limit stats
Definition at line 246 of file HPACKCodecTests.cpp.
References EXPECT_EQ, EXPECT_TRUE, proxygen::hpack::headersFromArray(), i, proxygen::hpack::TestHeaderCodecStats::tooLarge, and folly::value().
| TEST_F | ( | HPACKCodecTests | , |
| DefaultHeaderIndexingStrategy | |||
| ) |
Definition at line 268 of file HPACKCodecTests.cpp.
References proxygen::hpack::basicHeaders(), proxygen::HPACKCodec::encode(), EXPECT_EQ, and proxygen::hpack::headersFromArray().
| TEST_F | ( | HPACKQueueTests | , |
| QueueInline | |||
| ) |
Definition at line 309 of file HPACKCodecTests.cpp.
References proxygen::hpack::basicHeaders(), EXPECT_EQ, EXPECT_TRUE, proxygen::TestStreamingCallback::getResult(), i, folly::gen::move, and proxygen::TestStreamingCallback::reset().
| TEST_F | ( | HPACKQueueTests | , |
| QueueReorder | |||
| ) |
Definition at line 324 of file HPACKCodecTests.cpp.
References proxygen::hpack::basicHeaders(), folly::data(), EXPECT_EQ, EXPECT_TRUE, i, and folly::gen::move.
| TEST_F | ( | HPACKQueueTests | , |
| QueueReorderOoo | |||
| ) |
Definition at line 347 of file HPACKCodecTests.cpp.
References proxygen::hpack::basicHeaders(), folly::data(), EXPECT_EQ, EXPECT_TRUE, i, and folly::gen::move.
| TEST_F | ( | HPACKQueueTests | , |
| QueueError | |||
| ) |
Definition at line 371 of file HPACKCodecTests.cpp.
References proxygen::hpack::basicHeaders(), EXPECT_EQ, EXPECT_TRUE, proxygen::TestStreamingCallback::getResult(), i, folly::gen::move, and proxygen::TestStreamingCallback::reset().
| TEST_P | ( | HPACKQueueTests | , |
| QueueDeleted | |||
| ) |
Definition at line 394 of file HPACKCodecTests.cpp.
References proxygen::hpack::basicHeaders(), folly::data(), i, INSTANTIATE_TEST_CASE_P(), and folly::gen::move.