Skip to content

Commit

Permalink
Update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Oct 20, 2024
1 parent f2ef6d4 commit d6fc38e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
18 changes: 0 additions & 18 deletions cpp/test/disk_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,24 +462,6 @@ TEST(DiskTest, ModeSense10)
ValidateCachingPage(*controller, 16);
}

TEST(DiskTest, ReadData)
{
MockDisk disk;

EXPECT_THAT([&] {disk.ReadData( {});}, Throws<scsi_exception>(AllOf(
Property(&scsi_exception::get_sense_key, sense_key::not_ready),
Property(&scsi_exception::get_asc, asc::medium_not_present)))) << "Disk is not ready";
}

TEST(DiskTest, WriteData)
{
MockDisk disk;

EXPECT_THAT([&] {disk.WriteData( {}, scsi_command::write6);}, Throws<scsi_exception>(AllOf(
Property(&scsi_exception::get_sense_key, sense_key::not_ready),
Property(&scsi_exception::get_asc, asc::medium_not_present)))) << "Disk is not ready";
}

TEST(DiskTest, SynchronizeCache)
{
auto [controller, disk] = CreateDisk();
Expand Down
7 changes: 0 additions & 7 deletions cpp/test/scsi_cd_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,3 @@ TEST(ScsiCdTest, ReadToc)
EXPECT_CALL(controller, DataIn());
EXPECT_NO_THROW(cd->Dispatch(scsi_command::read_toc));
}

TEST(ScsiCdTest, ReadData)
{
ScsiCd cd(0);

EXPECT_THROW(cd.ReadData( {}), scsi_exception)<< "Drive is not ready";
}

0 comments on commit d6fc38e

Please sign in to comment.