Skip to content

Commit

Permalink
testing++
Browse files Browse the repository at this point in the history
  • Loading branch information
henricasanova committed Oct 11, 2024
1 parent 83adf3e commit ec89600
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/file_system_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ TEST_F(FileSystemTest, Directories) {

// Create one actor (for this test we could likely do it all in the maestro but what the hell)
sg4::Actor::create("TestActor", host_, [this]() {
XBT_INFO("Check that directory /dev/a/ exists");
ASSERT_TRUE(fs_->directory_exists("/dev/a/"));
XBT_INFO("Create a 10kB file at /dev/a/foo.txt");
ASSERT_NO_THROW(fs_->create_file("/dev/a/foo.txt", "10kB"));
XBT_INFO("Create a 10kB file at /dev/a/b/c/foo.txt");
Expand All @@ -142,6 +144,7 @@ TEST_F(FileSystemTest, Directories) {
ASSERT_THROW(fs_->unlink_directory("/dev/a/b/d"), sgfs::DirectoryDoesNotExistException);
ASSERT_FALSE(fs_->directory_exists("/dev/a/b/d"));


ASSERT_THROW(fs_->create_directory("/whatever/bogus"), sgfs::InvalidPathException);
ASSERT_THROW(fs_->create_directory("/dev/a/foo.txt"), sgfs::InvalidPathException);
ASSERT_NO_THROW(fs_->create_directory("/dev/a/new_dir"));
Expand Down

0 comments on commit ec89600

Please sign in to comment.