21 #include <gmock/gmock.h> 22 #include <gtest/gtest.h> 24 using namespace folly;
30 std::unique_ptr<IOBuf>>>
33 MATCHER_P(IOBufContains, str,
"") {
return arg->moveToFbString() == str; }
35 TEST(OutputBufferingHandlerTest, Basic) {
46 pipeline->setTransport(
socket);
54 EXPECT_CALL(mockHandler, write_(
_, IOBufContains(
"helloworld")));
63 EXPECT_CALL(mockHandler, write_(
_, IOBufContains(
"foo")));
MATCHER_P(IOBufContains, str,"")
StrictMock< MockHandlerAdapter< IOBufQueue &, std::unique_ptr< IOBuf > > > MockBytesHandler
—— Concurrent Priority Queue Implementation ——
bool loopOnce(int flags=0)
NetworkSocket socket(int af, int type, int protocol)
#define EXPECT_TRUE(condition)
static std::shared_ptr< AsyncSocket > newSocket(EventBase *evb)
#define EXPECT_CALL(obj, call)
const internal::AnythingMatcher _
#define EXPECT_FALSE(condition)
static std::unique_ptr< IOBuf > copyBuffer(const void *buf, std::size_t size, std::size_t headroom=0, std::size_t minTailroom=0)
TEST(SequencedExecutor, CPUThreadPoolExecutor)