|
proxygen
|
#include <folly/io/Cursor.h>#include <folly/io/IOBufQueue.h>#include <folly/portability/GTest.h>#include <proxygen/lib/http/codec/compress/Huffman.h>#include <proxygen/lib/http/codec/compress/Logging.h>#include <tuple>Go to the source code of this file.
Classes | |
| class | HuffmanTests |
| class | TestingHuffTree |
Functions | |
| TEST_F (HuffmanTests, Codes) | |
| TEST_F (HuffmanTests, Size) | |
| TEST_F (HuffmanTests, Encode) | |
| TEST_F (HuffmanTests, Decode) | |
| TEST_F (HuffmanTests, NonPrintableDecode) | |
| TEST_F (HuffmanTests, ExampleCom) | |
| TEST_F (HuffmanTests, UserAgent) | |
| TEST_F (HuffmanTests, FitInBuffer) | |
| uint32_t | treeDfs (const SuperHuffNode *allSnodes, const uint32_t &snodeIndex, const uint32_t &depth, const uint32_t &fullCode, const uint32_t &eosCode, const uint32_t &eosCodeBits) |
| TEST_F (HuffmanTests, SanityChecks) | |
| TEST_F | ( | HuffmanTests | , |
| Codes | |||
| ) |
| TEST_F | ( | HuffmanTests | , |
| Size | |||
| ) |
Definition at line 45 of file HuffmanTests.cpp.
References folly::netops::accept(), EXPECT_EQ, folly::size(), and uint32_t.
| TEST_F | ( | HuffmanTests | , |
| Encode | |||
| ) |
Definition at line 56 of file HuffmanTests.cpp.
References folly::netops::accept(), folly::data(), folly::IOBuf::data(), folly::io::QueueAppender::ensure(), EXPECT_EQ, folly::IOBufQueue::front(), folly::size(), uint32_t, and uint8_t.
| TEST_F | ( | HuffmanTests | , |
| Decode | |||
| ) |
Definition at line 80 of file HuffmanTests.cpp.
References buffer(), folly::basic_fbstring< E, T, A, Storage >::clear(), EXPECT_EQ, and uint8_t.
| TEST_F | ( | HuffmanTests | , |
| NonPrintableDecode | |||
| ) |
Definition at line 108 of file HuffmanTests.cpp.
References EXPECT_EQ, folly::basic_fbstring< E, T, A, Storage >::size(), and uint8_t.
| TEST_F | ( | HuffmanTests | , |
| ExampleCom | |||
| ) |
Definition at line 131 of file HuffmanTests.cpp.
References folly::IOBuf::data(), folly::io::QueueAppender::ensure(), EXPECT_EQ, folly::IOBufQueue::front(), folly::size(), and uint32_t.
| TEST_F | ( | HuffmanTests | , |
| UserAgent | |||
| ) |
Definition at line 148 of file HuffmanTests.cpp.
References folly::IOBuf::data(), proxygen::huffman::HuffTree::decode(), proxygen::huffman::HuffTree::encode(), folly::io::QueueAppender::ensure(), EXPECT_EQ, folly::IOBufQueue::front(), proxygen::huffman::HuffTree::getEncodeSize(), proxygen::huffman::huffTree(), folly::size(), and uint32_t.
| TEST_F | ( | HuffmanTests | , |
| FitInBuffer | |||
| ) |
Definition at line 170 of file HuffmanTests.cpp.
References folly::io::QueueAppender::append(), folly::io::QueueAppender::ensure(), and folly::io::QueueAppender::length().
| TEST_F | ( | HuffmanTests | , |
| SanityChecks | |||
| ) |
Definition at line 280 of file HuffmanTests.cpp.
References EXPECT_EQ, TestingHuffTree::getHuffTree(), TestingHuffTree::getInternalTable(), treeDfs(), and uint32_t.
| uint32_t treeDfs | ( | const SuperHuffNode * | allSnodes, |
| const uint32_t & | snodeIndex, | ||
| const uint32_t & | depth, | ||
| const uint32_t & | fullCode, | ||
| const uint32_t & | eosCode, | ||
| const uint32_t & | eosCodeBits | ||
| ) |
Definition at line 199 of file HuffmanTests.cpp.
References proxygen::huffman::HuffNode::bits, proxygen::huffman::HuffNode::ch, proxygen::huffman::HuffNode::data, EXPECT_TRUE, i, proxygen::huffman::SuperHuffNode::index, proxygen::huffman::HuffNode::isLeaf(), proxygen::huffman::HuffNode::metadata, proxygen::huffman::HuffNode::superNodeIndex, and uint32_t.
Referenced by TEST_F().