39 std::shared_ptr<folly::IOBuf>,
45 std::unique_ptr<folly::IOBuf>&& iob,
47 writeChain(callback, std::shared_ptr<folly::IOBuf>(iob.release()),
flags);
56 return eq(*arg, *expected);
59 TEST(WriteChainAsyncTransportWrapperTest, TestSimpleIov) {
63 EXPECT_CALL(transport, writeChain(
_, BufMatches(buf.get()),
_));
65 auto iov = buf->getIov();
66 transport.
writev(
nullptr, iov.data(), iov.size());
69 TEST(WriteChainAsyncTransportWrapperTest, TestChainedIov) {
74 EXPECT_CALL(transport, writeChain(
_, BufMatches(buf.get()),
_));
76 auto iov = buf->getIov();
77 transport.
writev(
nullptr, iov.data(), iov.size());
80 TEST(WriteChainAsyncTransportWrapperTest, TestSimpleBuf) {
84 EXPECT_CALL(transport, writeChain(
_, BufMatches(buf.get()),
_));
86 transport.
write(
nullptr, buf->data(), buf->length());
~TestWriteChainAsyncTransportWrapper() override
void writev(folly::AsyncTransportWrapper::WriteCallback *callback, const iovec *vec, size_t count, folly::WriteFlags flags=folly::WriteFlags::NONE) override
—— Concurrent Priority Queue Implementation ——
#define MOCK_METHOD3(m,...)
void write(folly::AsyncTransportWrapper::WriteCallback *callback, const void *buf, size_t bytes, folly::WriteFlags flags=folly::WriteFlags::NONE) override
TEST(GTestEnvVarTest, Dummy)
TestWriteChainAsyncTransportWrapper()
#define EXPECT_CALL(obj, call)
const internal::AnythingMatcher _
void writeChain(WriteCallback *callback, std::unique_ptr< folly::IOBuf > &&iob, folly::WriteFlags flags=folly::WriteFlags::NONE) override
static std::unique_ptr< IOBuf > copyBuffer(const void *buf, std::size_t size, std::size_t headroom=0, std::size_t minTailroom=0)
MATCHER_P(BufMatches, expected,"")