Skip to content

Commit

Permalink
add gmock example After
Browse files Browse the repository at this point in the history
  • Loading branch information
leanid committed Jan 22, 2025
1 parent 3e50d54 commit 76457d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 00-basic-prog/36-gtest/main_moc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ TEST(PainterTest, CanDrawSomething)
{
MockTurtle turtle;
using namespace ::testing;
EXPECT_CALL(turtle, PenDown()).Times(AtLeast(1));
Expectation pen_down = EXPECT_CALL(turtle, PenDown()).Times(AtLeast(1));
EXPECT_CALL(turtle, Forward(10)).Times(AtLeast(1));
EXPECT_CALL(turtle, Turn(45)).Times(AtLeast(1));
EXPECT_CALL(turtle, GoTo(42, 50)).Times(AtLeast(1));
EXPECT_CALL(turtle, PenUp()).Times(AtLeast(1));
EXPECT_CALL(turtle, PenUp()).Times(AtLeast(1)).After(pen_down);
EXPECT_CALL(turtle, GetX()).Times(AtLeast(1)).WillOnce(Return(42));

auto painter = [](Turtle* turtle)
Expand Down

0 comments on commit 76457d9

Please sign in to comment.