MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / testPartialExtent

Function testPartialExtent

tests/cpmfs.cc:135–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135static void testPartialExtent()
136{
137 auto sectors = std::make_shared<TestSectorInterface>();
138 auto fs = Filesystem::createCpmFsFilesystem(
139 globalConfig()->filesystem(), diskLayout, sectors);
140
141 setBlock(sectors,
142 0,
143 createDirent("FILE", 0, 1, {1, 0, 0, 0, 0, 0, 0, 0, 0}) +
144 (blank_dirent * 63));
145 setBlock(sectors, 1, {1});
146
147 auto files = fs->list(Path());
148 AssertThat(files.size(), Equals(1));
149
150 auto data = fs->getFile(Path("0:FILE"));
151 AssertThat(data.size(), Equals(128));
152 AssertThat(data[0x4000 * 0], Equals(1));
153}
154
155static void testLogicalExtents()
156{

Callers 1

mainFunction · 0.85

Calls 6

setBlockFunction · 0.85
createDirentFunction · 0.85
PathClass · 0.50
listMethod · 0.45
sizeMethod · 0.45
getFileMethod · 0.45

Tested by

no test coverage detected