From 28027385bc56c40c10545479cfdf5c8631b6a769 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 14 Sep 2023 09:33:45 -0400 Subject: [PATCH] Attempt further to cheer via statistics. Current opcode failure count: 164 out of 324. Just a shade more than 50%. --- OSBindings/Mac/Clock SignalTests/8088Tests.mm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/OSBindings/Mac/Clock SignalTests/8088Tests.mm b/OSBindings/Mac/Clock SignalTests/8088Tests.mm index ebadb1ed8..c669f152a 100644 --- a/OSBindings/Mac/Clock SignalTests/8088Tests.mm +++ b/OSBindings/Mac/Clock SignalTests/8088Tests.mm @@ -80,13 +80,17 @@ constexpr char TestSuiteHome[] = "/Users/tharte/Projects/ProcessorTests/8088/v1" } - (void)testDecoding { - for(NSString *file in [self testFiles]) { + NSMutableSet *failures = [[NSMutableSet alloc] init]; + NSArray *testFiles = [self testFiles]; + + for(NSString *file in testFiles) { NSData *data = [NSData dataWithContentsOfGZippedFile:file]; NSArray *testsInFile = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil]; NSUInteger successes = 0; for(NSDictionary *test in testsInFile) { // A single failure per instruction is fine. if(![self applyDecodingTest:test]) { + [failures addObject:file]; break; } ++successes; @@ -95,6 +99,8 @@ constexpr char TestSuiteHome[] = "/Users/tharte/Projects/ProcessorTests/8088/v1" NSLog(@"Failed after %ld successes", successes); } } + + NSLog(@"%ld failures out of %ld tests: %@", failures.count, testFiles.count, failures); } @end