Skip to content

Commit

Permalink
Update unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Dec 12, 2023
1 parent 49dab8a commit 39bfaaf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cpp/test/scsi_controller_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ TEST(ScsiControllerTest, GetInitiatorId)

controller.AddDevice(device);

EXPECT_CALL(controller, Status).Times(2);
controller.Process(ID);
EXPECT_EQ(ID, controller.GetInitiatorId());
controller.Process(-1);
Expand All @@ -40,12 +41,14 @@ TEST(ScsiControllerTest, Process)
ON_CALL(*bus, GetRST).WillByDefault(Return(true));
EXPECT_CALL(*bus, Acquire);
EXPECT_CALL(*bus, GetRST);
EXPECT_CALL(controller, Reset());
EXPECT_FALSE(controller.Process(0));

controller.SetPhase(phase_t::busfree);
ON_CALL(*bus, GetRST).WillByDefault(Return(false));
EXPECT_CALL(*bus, Acquire);
EXPECT_CALL(*bus, GetRST);
EXPECT_CALL(controller, Status());
EXPECT_FALSE(controller.Process(0));

controller.SetPhase(phase_t::reserved);
Expand Down

0 comments on commit 39bfaaf

Please sign in to comment.