| 177 | } |
| 178 | |
| 179 | static void testBitmap() |
| 180 | { |
| 181 | auto sectors = std::make_shared<TestSectorInterface>(); |
| 182 | auto fs = Filesystem::createCpmFsFilesystem( |
| 183 | globalConfig()->filesystem(), diskLayout, sectors); |
| 184 | |
| 185 | setBlock(sectors, |
| 186 | 0, |
| 187 | createDirent("FILE", 1, 128, {1, 0, 0, 0, 0, 0, 0, 0, 2}) + |
| 188 | createDirent("FILE", 2, 128, {4}) + (blank_dirent * 62)); |
| 189 | |
| 190 | dynamic_cast<HasMount*>(fs.get())->mount(); |
| 191 | std::vector<bool> bitmap = |
| 192 | dynamic_cast<HasBitmap*>(fs.get())->getBitmapForDebugging(); |
| 193 | AssertThat(bitmap, |
| 194 | Equals(std::vector<bool>{ |
| 195 | 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})); |
| 196 | } |
| 197 | #if 0 |
| 198 | |
| 199 | static void testPutGet() |
no test coverage detected