MCPcopy Create free account
hub / github.com/Simple-XX/SimpleKernel / TEST_F

Function TEST_F

tests/unit_test/ramfs_test.cpp:37–41  ·  view source on GitHub ↗

测试基本挂载/卸载

Source from the content-addressed store, hash-verified

35
36// 测试基本挂载/卸载
37TEST_F(RamFsTest, MountUnmount) {
38 // SetUp 中已经挂载,这里测试重复挂载
39 auto result = ramfs_.Mount(nullptr);
40 EXPECT_FALSE(result.has_value()); // 应该失败,因为已经挂载
41}
42
43TEST_F(RamFsTest, GetName) { EXPECT_STREQ(ramfs_.GetName(), "ramfs"); }
44

Callers

nothing calls this directly

Calls 15

strlenFunction · 0.85
GetRootInodeMethod · 0.80
MountMethod · 0.45
GetNameMethod · 0.45
AllocateInodeMethod · 0.45
FreeInodeMethod · 0.45
CreateMethod · 0.45
LookupMethod · 0.45
MkdirMethod · 0.45
UnlinkMethod · 0.45
RmdirMethod · 0.45
GetFileOpsMethod · 0.45

Tested by

no test coverage detected