Lines Matching defs:mock
32 // Google Mock - a framework for writing C++ mock classes.
51 // mock for a function with const arguments, so we don't test such
119 // Makes sure that a mock function parameter can be named.
124 // Makes sure that a mock function parameter can be unnamed.
369 // Tests that template mock works.
371 MockStack<int> mock;
373 EXPECT_CALL(mock, GetSize())
377 EXPECT_CALL(mock, Push(_));
379 EXPECT_CALL(mock, GetTop())
381 EXPECT_CALL(mock, Pop())
384 EXPECT_EQ(0, mock.GetSize());
385 mock.Push(5);
386 EXPECT_EQ(1, mock.GetSize());
387 EXPECT_EQ(5, mock.GetTop());
388 mock.Pop();
389 EXPECT_EQ(0, mock.GetSize());
422 // Tests that template mock with calltype works.
424 MockStackWithCallType<int> mock;
426 EXPECT_CALL(mock, GetSize())
430 EXPECT_CALL(mock, Push(_));
432 EXPECT_CALL(mock, GetTop())
434 EXPECT_CALL(mock, Pop())
437 EXPECT_EQ(0, mock.GetSize());
438 mock.Push(5);
439 EXPECT_EQ(1, mock.GetSize());
440 EXPECT_EQ(5, mock.GetTop());
441 mock.Pop();
442 EXPECT_EQ(0, mock.GetSize());
462 MockOverloadedOnArgNumber mock;
463 EXPECT_CALL(mock, Overloaded());
464 EXPECT_CALL(mock, Overloaded(1)).WillOnce(Return(2));
465 EXPECT_CALL(mock, Overloaded(true, 1)).WillOnce(Return(true));
467 mock.Overloaded();
468 EXPECT_EQ(2, mock.Overloaded(1));
469 EXPECT_TRUE(mock.Overloaded(true, 1));
487 MockOverloadedOnConstness mock;
488 const MockOverloadedOnConstness* const_mock = &mock;
489 EXPECT_CALL(mock, Overloaded(1)).WillOnce(Return(2));
492 EXPECT_EQ(2, mock.Overloaded(1));