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

Hides all runtime Program member accesses behind macros.

... and fixes unit tests.
This commit is contained in:
Thomas Harte 2019-07-24 12:01:30 -04:00
parent 0469f0240b
commit 0187fd8eae
3 changed files with 264 additions and 253 deletions

View File

@ -104,7 +104,8 @@ class EmuTOS: public ComparativeBusHandler {
}
- (void)testImage:(NSString *)image trace:(NSString *)trace length:(int)length {
const auto roms = CSROMFetcher()("AtariST", { image.UTF8String });
const std::vector<ROMMachine::ROM> rom_names = {{"AtariST", "", image.UTF8String, 0, 0 }};
const auto roms = CSROMFetcher()(rom_names);
NSString *const traceLocation = [[NSBundle bundleForClass:[self class]] pathForResource:trace ofType:@"trace.txt.gz"];
_machine.reset(new EmuTOS(*roms[0], traceLocation.UTF8String));
_machine->run_for(HalfCycles(length));

View File

@ -101,7 +101,8 @@ class QL: public ComparativeBusHandler {
Tests the progression of Clock Signal's 68000 through the Sinclair QL's ROM against a known-good trace.
*/
- (void)testStartup {
const auto roms = CSROMFetcher()("SinclairQL", {"js.rom"});
const std::vector<ROMMachine::ROM> rom_names = {{"SinclairQL", "", "js.rom", 0, 0 }};
const auto roms = CSROMFetcher()(rom_names);
NSString *const traceLocation = [[NSBundle bundleForClass:[self class]] pathForResource:@"qltrace" ofType:@".txt.gz"];
_machine.reset(new QL(*roms[0], traceLocation.UTF8String));

File diff suppressed because it is too large Load Diff