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 77bb74c commit f2ef6d4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
1 change: 0 additions & 1 deletion cpp/test/mocks.h
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,6 @@ class MockTape : public Tape
{
FRIEND_TEST(TapeTest, ValidateFile);
FRIEND_TEST(TapeTest, SetUpModePages);
FRIEND_TEST(TapeTest, ReadData);
FRIEND_TEST(TapeTest, Unload);

public:
Expand Down
19 changes: 0 additions & 19 deletions cpp/test/tape_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,25 +104,6 @@ TEST(TapeTest, Open)
EXPECT_NO_THROW(tape.Open());
}

TEST(TapeTest, ReadData)
{
vector<uint8_t> buf(1);
MockTape tape(0);

tape.SetReady(true);
tape.SetBlockCount(1);
auto filename = CreateTempFile(1, "tap");
tape.SetFilename(filename.string());
tape.ValidateFile();
EXPECT_THROW(tape.ReadData(buf), scsi_exception);

tape.CleanUp();
filename = CreateTempFile(1, "tar");
tape.SetFilename(filename.string());
tape.ValidateFile();
EXPECT_NO_THROW(tape.ReadData(buf));
}

TEST(TapeTest, Unload)
{
MockTape tape(0);
Expand Down

0 comments on commit f2ef6d4

Please sign in to comment.