Skip to content

Commit

Permalink
Test cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Mar 3, 2024
1 parent 352312f commit 53c473c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cpp/test/disk_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -719,19 +719,17 @@ TEST(DiskTest, VerifySectorSizeChange)
TEST(DiskTest, ReadData)
{
MockDisk disk;
vector<uint8_t> buf;

EXPECT_THAT([&] {disk.ReadData(buf);}, Throws<scsi_exception>(AllOf(
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;
vector<uint8_t> buf;

EXPECT_THAT([&] {disk.WriteData(buf, scsi_command::cmd_write6);}, Throws<scsi_exception>(AllOf(
EXPECT_THAT([&] {disk.WriteData( {}, scsi_command::cmd_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";
}
Expand Down

0 comments on commit 53c473c

Please sign in to comment.