From a59ad064386d54d3b71c38d7a384e0ac7181eda5 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 9 Jun 2022 13:13:33 -0400 Subject: [PATCH] Print out summary of failure. --- OSBindings/Mac/Clock SignalTests/68000OldVsNew.mm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/OSBindings/Mac/Clock SignalTests/68000OldVsNew.mm b/OSBindings/Mac/Clock SignalTests/68000OldVsNew.mm index cae12669f..133205668 100644 --- a/OSBindings/Mac/Clock SignalTests/68000OldVsNew.mm +++ b/OSBindings/Mac/Clock SignalTests/68000OldVsNew.mm @@ -14,6 +14,7 @@ #include #include +#include namespace { @@ -261,7 +262,8 @@ template struct Tester { // Use a fixed seed to guarantee continuity across repeated runs. srand(68000); - for(int c = 0x4e72; c < 65536; c++) { + std::set failing_operations; + for(int c = 0; c < 65536; c++) { printf("%04x\n", c); // Test only defined opcodes. @@ -346,6 +348,7 @@ template struct Tester { } printf("\n"); + failing_operations.insert(instruction.operation); break; } @@ -366,11 +369,17 @@ template struct Tester { mismatch |= oldState.supervisor_stack_pointer != newState.registers.supervisor_stack_pointer; if(mismatch) { + failing_operations.insert(instruction.operation); printf("Registers don't match after %s, test %d\n", instruction.to_string().c_str(), test); // TODO: more detail here! } } } + + printf("\nAll failing operations:\n"); + for(const auto operation: failing_operations) { + printf("%d,\n", int(operation)); + } } @end