MCPcopy Create free account
hub / github.com/PiSCSI/piscsi / TEST

Function TEST

cpp/test/disk_test.cpp:29–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29TEST(DiskTest, Dispatch)
30{
31 auto [controller, disk] = CreateDisk();
32
33 disk->SetRemovable(true);
34 disk->SetMediumChanged(false);
35 disk->SetReady(true);
36 EXPECT_CALL(*controller, Status);
37 disk->Dispatch(scsi_command::eCmdTestUnitReady);
38 EXPECT_EQ(status::good, controller->GetStatus());
39
40 disk->SetMediumChanged(true);
41 EXPECT_CALL(*controller, Error);
42 disk->Dispatch(scsi_command::eCmdTestUnitReady);
43 EXPECT_FALSE(disk->IsMediumChanged());
44}
45
46TEST(DiskTest, Rezero)
47{

Callers

nothing calls this directly

Calls 15

CreateDiskFunction · 0.85
SetRemovableMethod · 0.80
SetMediumChangedMethod · 0.80
SetReadyMethod · 0.80
GetStatusMethod · 0.80
IsMediumChangedMethod · 0.80
SetCmdByteMethod · 0.80
SetBlockCountMethod · 0.80
SetSectorSizeInBytesMethod · 0.80

Tested by

no test coverage detected