本文整理汇总了C++中testing::AnyNumber方法的典型用法代码示例。如果您正苦于以下问题:C++ testing::AnyNumber方法的具体用法?C++ testing::AnyNumber怎么用?C++ testing::AnyNumber使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类testing
的用法示例。
在下文中一共展示了testing::AnyNumber方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: connect
TEST_F(DocumentWebSocketChannelTest, sendTextContinuation)
{
connect();
Checkpoint checkpoint;
{
InSequence s;
EXPECT_CALL(*handle(), send(false, WebSocketHandle::MessageTypeText, MemEq("0123456789abcdef", 16), 16));
EXPECT_CALL(checkpoint, Call(1));
EXPECT_CALL(*handle(), send(true, WebSocketHandle::MessageTypeContinuation, MemEq("g", 1), 1));
EXPECT_CALL(*handle(), send(true, WebSocketHandle::MessageTypeText, MemEq("hijk", 4), 4));
EXPECT_CALL(*handle(), send(false, WebSocketHandle::MessageTypeText, MemEq("lmnopqrstuv", 11), 11));
EXPECT_CALL(checkpoint, Call(2));
EXPECT_CALL(*handle(), send(false, WebSocketHandle::MessageTypeContinuation, MemEq("wxyzABCDEFGHIJKL", 16), 16));
EXPECT_CALL(checkpoint, Call(3));
EXPECT_CALL(*handle(), send(true, WebSocketHandle::MessageTypeContinuation, MemEq("MNOPQRSTUVWXYZ", 14), 14));
}
handleClient()->didReceiveFlowControl(handle(), 16);
EXPECT_CALL(*channelClient(), didConsumeBufferedAmount(_)).Times(AnyNumber());
channel()->send("0123456789abcdefg");
channel()->send("hijk");
channel()->send("lmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
checkpoint.Call(1);
handleClient()->didReceiveFlowControl(handle(), 16);
checkpoint.Call(2);
handleClient()->didReceiveFlowControl(handle(), 16);
checkpoint.Call(3);
handleClient()->didReceiveFlowControl(handle(), 16);
EXPECT_EQ(62ul, m_sumOfConsumedBufferedAmount);
}
示例2:
TestFixture::~TestFixture() {
TestDriver driver;
clear_all_keys();
// Run for a while to make sure all keys are completely released
EXPECT_CALL(driver, send_keyboard_mock(_)).Times(AnyNumber());
idle_for(TAPPING_TERM + 10);
testing::Mock::VerifyAndClearExpectations(&driver);
// Verify that the matrix really is cleared
EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(Between(0, 1));
}
示例3: so
TEST_F(SimpleObjectTest, erase_opengl_buffers_before_buffer_generating)
{
EXPECT_CALL(gl, gl_GetError()).Times(AnyNumber());
{
InSequence s;
EXPECT_CALL(gl, gl_GetError()).Times(AtLeast(1));
EXPECT_CALL(gl, gl_GenBuffers(_,_)).Times(AtLeast(1));
}
SimpleObject so(to);
}