|
proxygen
|
#include <folly/io/IOBufQueue.h>#include <cstring>#include <iostream>#include <stdexcept>#include <folly/Range.h>#include <folly/portability/GTest.h>Go to the source code of this file.
Macros | |
| #define | SCL(x) (x), sizeof(x) - 1 |
Functions | |
| TEST (IOBufQueue, Simple) | |
| TEST (IOBufQueue, Append) | |
| TEST (IOBufQueue, Append2) | |
| TEST (IOBufQueue, AppendStringPiece) | |
| TEST (IOBufQueue, Split) | |
| TEST (IOBufQueue, SplitAtMost) | |
| TEST (IOBufQueue, SplitZero) | |
| TEST (IOBufQueue, Preallocate) | |
| TEST (IOBufQueue, Wrap) | |
| TEST (IOBufQueue, Trim) | |
| TEST (IOBufQueue, TrimStartAtMost) | |
| TEST (IOBufQueue, TrimEndAtMost) | |
| TEST (IOBufQueue, TrimPack) | |
| TEST (IOBufQueue, Prepend) | |
| TEST (IOBufQueue, PopFirst) | |
| TEST (IOBufQueue, AppendToString) | |
| TEST (IOBufQueue, Gather) | |
Definition at line 34 of file IOBufQueueTest.cpp.
Referenced by TEST().
| TEST | ( | IOBufQueue | , |
| Simple | |||
| ) |
Definition at line 62 of file IOBufQueueTest.cpp.
References folly::IOBufQueue::append(), EXPECT_EQ, folly::IOBufQueue::front(), and SCL.
| TEST | ( | IOBufQueue | , |
| Append | |||
| ) |
Definition at line 74 of file IOBufQueueTest.cpp.
References folly::IOBufQueue::append(), folly::IOBuf::computeChainDataLength(), EXPECT_EQ, EXPECT_NE, folly::IOBufQueue::front(), folly::IOBufQueue::move(), and SCL.
| TEST | ( | IOBufQueue | , |
| Append2 | |||
| ) |
Definition at line 91 of file IOBufQueueTest.cpp.
References folly::IOBufQueue::append(), folly::IOBuf::computeChainDataLength(), EXPECT_EQ, EXPECT_NE, folly::IOBufQueue::front(), and SCL.
| TEST | ( | IOBufQueue | , |
| AppendStringPiece | |||
| ) |
Definition at line 108 of file IOBufQueueTest.cpp.
References folly::IOBufQueue::append(), folly::IOBuf::computeChainDataLength(), folly::IOBuf::data(), EXPECT_EQ, folly::IOBufQueue::front(), s, and string.
| TEST | ( | IOBufQueue | , |
| Split | |||
| ) |
Definition at line 123 of file IOBufQueueTest.cpp.
References folly::IOBufQueue::append(), folly::IOBuf::computeChainDataLength(), EXPECT_EQ, EXPECT_THROW, folly::IOBufQueue::front(), prefix(), SCL, and folly::IOBufQueue::split().
| TEST | ( | IOBufQueue | , |
| SplitAtMost | |||
| ) |
Definition at line 161 of file IOBufQueueTest.cpp.
References folly::IOBufQueue::append(), folly::IOBufQueue::empty(), EXPECT_EQ, EXPECT_TRUE, SCL, and folly::IOBufQueue::splitAtMost().
| TEST | ( | IOBufQueue | , |
| SplitZero | |||
| ) |
Definition at line 170 of file IOBufQueueTest.cpp.
References folly::IOBufQueue::append(), EXPECT_EQ, SCL, and folly::IOBufQueue::split().
| TEST | ( | IOBufQueue | , |
| Preallocate | |||
| ) |
Definition at line 177 of file IOBufQueueTest.cpp.
References folly::IOBufQueue::append(), folly::IOBuf::computeChainDataLength(), EXPECT_EQ, EXPECT_GE, EXPECT_LE, EXPECT_NE, folly::IOBufQueue::front(), folly::IOBufQueue::postallocate(), folly::IOBufQueue::preallocate(), and SCL.
| TEST | ( | IOBufQueue | , |
| Wrap | |||
| ) |
Definition at line 206 of file IOBufQueueTest.cpp.
References EXPECT_EQ, folly::IOBufQueue::move(), and folly::IOBufQueue::wrapBuffer().
| TEST | ( | IOBufQueue | , |
| Trim | |||
| ) |
Definition at line 220 of file IOBufQueueTest.cpp.
References a, folly::IOBufQueue::append(), folly::IOBuf::append(), folly::IOBuf::computeChainDataLength(), folly::IOBuf::countChainElements(), EXPECT_EQ, EXPECT_THROW, folly::IOBufQueue::front(), folly::IOBuf::length(), folly::gen::move, folly::IOBuf::prev(), folly::IOBufQueue::trimEnd(), and folly::IOBufQueue::trimStart().
| TEST | ( | IOBufQueue | , |
| TrimStartAtMost | |||
| ) |
Definition at line 278 of file IOBufQueueTest.cpp.
References a, folly::IOBufQueue::append(), folly::IOBuf::append(), folly::IOBufQueue::chainLength(), folly::IOBuf::computeChainDataLength(), folly::IOBuf::countChainElements(), EXPECT_EQ, folly::IOBufQueue::front(), folly::IOBuf::length(), folly::gen::move, and folly::IOBufQueue::trimStartAtMost().
| TEST | ( | IOBufQueue | , |
| TrimEndAtMost | |||
| ) |
Definition at line 313 of file IOBufQueueTest.cpp.
References a, folly::IOBufQueue::append(), folly::IOBuf::append(), folly::IOBufQueue::chainLength(), folly::IOBuf::computeChainDataLength(), folly::IOBuf::countChainElements(), EXPECT_EQ, folly::IOBufQueue::front(), folly::IOBuf::length(), folly::gen::move, and folly::IOBufQueue::trimEndAtMost().
| TEST | ( | IOBufQueue | , |
| TrimPack | |||
| ) |
Definition at line 348 of file IOBufQueueTest.cpp.
References a, folly::IOBufQueue::append(), folly::IOBuf::append(), folly::IOBuf::computeChainDataLength(), folly::IOBuf::countChainElements(), EXPECT_EQ, EXPECT_THROW, folly::IOBufQueue::front(), folly::IOBuf::length(), folly::gen::move, folly::IOBuf::prev(), folly::IOBufQueue::trimEnd(), and folly::IOBufQueue::trimStart().
| TEST | ( | IOBufQueue | , |
| Prepend | |||
| ) |
Definition at line 406 of file IOBufQueueTest.cpp.
References folly::IOBufQueue::append(), folly::IOBuf::create(), EXPECT_EQ, EXPECT_THROW, folly::IOBufQueue::move(), folly::gen::move, folly::IOBufQueue::prepend(), and SCL.
| TEST | ( | IOBufQueue | , |
| PopFirst | |||
| ) |
Definition at line 425 of file IOBufQueueTest.cpp.
References folly::IOBufQueue::append(), folly::IOBufQueue::chainLength(), folly::IOBuf::computeChainDataLength(), EXPECT_EQ, folly::gen::first, folly::IOBufQueue::front(), i, folly::IOBufQueue::pop_front(), and strings.
| TEST | ( | IOBufQueue | , |
| AppendToString | |||
| ) |
Definition at line 458 of file IOBufQueueTest.cpp.
References folly::IOBufQueue::append(), folly::IOBufQueue::appendToString(), EXPECT_EQ, s, and string.
| TEST | ( | IOBufQueue | , |
| Gather | |||
| ) |
Definition at line 467 of file IOBufQueueTest.cpp.
References folly::IOBufQueue::append(), folly::IOBuf::data(), EXPECT_EQ, folly::IOBufQueue::front(), folly::IOBufQueue::gather(), folly::IOBuf::length(), s, and SCL.