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

Function test_bounds

tests/layout.cc:185–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185static void test_bounds()
186{
187 globalConfig().clear();
188 globalConfig().readBaseConfig(R"M(
189 drive {
190 drive_type: DRIVETYPE_80TRACK
191 }
192
193 layout {
194 format_type: FORMATTYPE_40TRACK
195 tracks: 2
196 sides: 2
197 layoutdata {
198 sector_size: 256
199 physical {
200 start_sector: 0
201 count: 12
202 skew: 6
203 }
204 }
205 }
206 )M");
207
208 auto diskLayout = createDiskLayout();
209 AssertThat(diskLayout->groupSize, Equals(2));
210 AssertThat(diskLayout->getLogicalBounds(),
211 Equals(DiskLayout::LayoutBounds{0, 1, 0, 1}));
212 AssertThat(diskLayout->getPhysicalBounds(),
213 Equals(DiskLayout::LayoutBounds{0, 3, 0, 1}));
214}
215
216template <typename K, typename V>
217static std::vector<std::pair<K, V>> toVector(const std::map<K, V>& map)

Callers 1

mainFunction · 0.70

Calls 5

createDiskLayoutFunction · 0.85
readBaseConfigMethod · 0.80
getLogicalBoundsMethod · 0.80
getPhysicalBoundsMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected