Definition at line 119 of file RFC1867Test.cpp.
void proxygen::RFC1867Base::parse |
( |
unique_ptr< IOBuf > |
input, |
|
|
size_t |
chunkSize = 0 |
|
) |
| |
|
inline |
void proxygen::RFC1867Base::SetUp |
( |
| ) |
|
|
inline |
void proxygen::RFC1867Base::testSimple |
( |
unique_ptr< IOBuf > |
data, |
|
|
size_t |
fileSize, |
|
|
size_t |
splitSize, |
|
|
size_t |
parts |
|
) |
| |
|
protected |
- Parameters
-
data | full multipart content |
filesize | sum of all parts |
parts | number of parts |
Definition at line 167 of file RFC1867Test.cpp.
References testing::_, callback_, EXPECT_CALL, testing::Invoke(), parse(), testing::Return(), and uint64_t.
171 size_t fileLength = 0;
172 IOBufQueue parsedData{IOBufQueue::cacheChainLength()};
175 .WillRepeatedly(
Return(0));
177 .WillRepeatedly(
Invoke([&] (std::shared_ptr<IOBuf> data,
uint64_t) {
178 fileLength += data->computeChainDataLength();
179 parsedData.append(data->clone());
184 .WillRepeatedly(
Return());
185 parse(data->clone(), splitSize);
186 auto parsedDataBuf = parsedData.move();
187 if (fileLength > 0) {
190 parsedDataBuf->coalesce();
192 CHECK_EQ(fileLength, fileSize);
void parse(unique_ptr< IOBuf > input, size_t chunkSize=0)
StrictMock< Mock1867Callback > callback_
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
#define EXPECT_CALL(obj, call)
const internal::AnythingMatcher _
internal::ReturnAction< R > Return(R value)
The documentation for this class was generated from the following file: