1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-18 17:06:15 +00:00

Ensures no illegal accesses while testing MSX ROM type detection.

Specifically: the static analyser doesn't even correctly identify everything that is an MSX ROM yet, let alone then properly determine type.
This commit is contained in:
Thomas Harte 2018-01-01 17:38:26 -05:00
parent bc2879c412
commit c07113ea95
2 changed files with 4 additions and 2 deletions

View File

@ -220,7 +220,10 @@ static NSDictionary<NSString *, MSXROMRecord *> *romRecordsBySHA1 = @{
}
// assert equality
XCTAssert(targets.front().msx.paging_model == romRecord.cartridgeType, @"%@; should be %d, is %d", testFile, romRecord.cartridgeType, targets.front().msx.paging_model);
XCTAssert(!targets.empty(), "%@ should be recognised as an MSX file");
if(!targets.empty()) {
XCTAssert(targets.front().msx.paging_model == romRecord.cartridgeType, @"%@; should be %d, is %d", testFile, romRecord.cartridgeType, targets.front().msx.paging_model);
}
}
}

View File

@ -46,7 +46,6 @@ enum class MSXCartridgeType {
KonamiWithSCC,
ASCII8kb,
ASCII16kb,
RType,
FMPac
};