mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-29 12:50:28 +00:00
Add first pass at testing shadowing.
This commit is contained in:
parent
4e52572b03
commit
f5d56cc473
@ -371,6 +371,26 @@ namespace {
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
// Test shadowed regions.
|
||||
bool shadowed = false;
|
||||
int logical = 0;
|
||||
for(NSNumber *next in test[@"shadowed"]) {
|
||||
while(logical < [next intValue]) {
|
||||
const auto ®ion =
|
||||
self->_memoryMap.regions[self->_memoryMap.region_map[logical]];
|
||||
const bool isShadowed =
|
||||
IsShadowed(_memoryMap, region, (logical << 8));
|
||||
|
||||
XCTAssertEqual(
|
||||
isShadowed,
|
||||
shadowed,
|
||||
@"Logical page %04x %@ subject to shadowing", logical, shadowed ? @"should be" : @"should not be");
|
||||
|
||||
++logical;
|
||||
}
|
||||
shadowed ^= true;
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user