Skip to content

Commit

Permalink
Remove redundant EXPECT_CALL
Browse files Browse the repository at this point in the history
The original `EXPECT_CALL` already has an implicit `Times(1)`, so there is no need for a second `EXPECT_CALL` with an explicit `Times(0)`.

This also removes an `EXPECT_CALL` after a call to a mock handler, which would be undefined behavior. Thus this removes the undefined behavior.
  • Loading branch information
DanRStevens committed Jan 2, 2025
1 parent ab73d3d commit 1bfa17b
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion test/Signal/Signal.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@ TEST(Signal, ConnectEmitDisconnect) {
signal.disconnect(delegate);
EXPECT_TRUE(signal.empty());

EXPECT_CALL(handler, MockMethod()).Times(0);
signal.emit();
}

0 comments on commit 1bfa17b

Please sign in to comment.