tests: add some exec tests

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2023-09-18 08:05:21 +05:30
parent dd9dd5f116
commit b918b75f27
22 changed files with 1331 additions and 604 deletions

View File

@@ -82,9 +82,9 @@ main(int argc, const char* argv[]) {
}
std::flush(std::cout);
std::flush(std::cerr);
std::flush(std::cout);
{
try {
Memory memory(std::move(bios), std::move(rom));
Bus bus(memory);
Cpu cpu(bus);
@@ -92,7 +92,11 @@ main(int argc, const char* argv[]) {
cpu.step();
sleep(1);
}
} catch (const std::exception& e) {
std::cerr << "Exception: " << e.what() << std::endl;
return 1;
}
return 0;
}