1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-04-11 14:37:37 +00:00

Introduce failing is-IO test.

This commit is contained in:
Thomas Harte 2022-06-29 14:44:17 -04:00
parent 5dfbc58959
commit 48e8bfbb0e

View File

@ -391,6 +391,25 @@ namespace {
}
shouldBeShadowed ^= true;
}
// Test IO regions.
bool shouldBeIO = false;
logical = 0;
for(NSNumber *next in test[@"io"]) {
while(logical < [next intValue]) {
const auto &region =
self->_memoryMap.regions[self->_memoryMap.region_map[logical]];
const bool isIO = region.flags & MemoryMap::Region::IsIO;
XCTAssertEqual(
isIO,
shouldBeIO,
@"Logical page %04x %@ marked as IO", logical, shouldBeIO ? @"should be" : @"should not be");
++logical;
}
shouldBeIO ^= true;
}
}];
}