diff options
Diffstat (limited to 'kernel/src/filesystem/rootfs/filesystem.tests.cpp')
| -rw-r--r-- | kernel/src/filesystem/rootfs/filesystem.tests.cpp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/kernel/src/filesystem/rootfs/filesystem.tests.cpp b/kernel/src/filesystem/rootfs/filesystem.tests.cpp deleted file mode 100644 index ae320e95..00000000 --- a/kernel/src/filesystem/rootfs/filesystem.tests.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include <kernel/filesystem/rootfs/filesystem.hpp> - -#include <kernel/filesystem/filesystem.hpp> - -#include <kstd/memory> -#include <kstd/print> -#include <kstd/vector> - -#include <catch2/catch_test_macros.hpp> - -SCENARIO("Rootfs filesystem mount and lookup", "[filesystem][rootfs][filesystem]") -{ - GIVEN("a mounted rootfs filesystem") - { - auto fs = kernel::filesystem::rootfs::filesystem{}; - auto result = fs.mount(nullptr); - - THEN("the filesystem can be mounted successfully") - { - REQUIRE(result == kernel::filesystem::filesystem::operation_result::success); - REQUIRE(fs.root_inode() != nullptr); - } - - THEN("looking up a non-existent directory returns null") - { - auto non_existent_inode_1 = fs.lookup(fs.root_inode(), ""); - REQUIRE(non_existent_inode_1 == nullptr); - auto non_existent_inode_2 = fs.lookup(fs.root_inode(), "nonexistent"); - REQUIRE(non_existent_inode_2 == nullptr); - } - - THEN("looking up with a null parent inode returns null") - { - auto result = fs.lookup(nullptr, "dev"); - REQUIRE(result == nullptr); - } - } -} |
