1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-05 10:28:58 +00:00

Attempt further to cheer via statistics.

Current opcode failure count: 164 out of 324. Just a shade more than 50%.
This commit is contained in:
Thomas Harte 2023-09-14 09:33:45 -04:00
parent 53d8322b46
commit 28027385bc

View File

@ -80,13 +80,17 @@ constexpr char TestSuiteHome[] = "/Users/tharte/Projects/ProcessorTests/8088/v1"
}
- (void)testDecoding {
for(NSString *file in [self testFiles]) {
NSMutableSet<NSString *> *failures = [[NSMutableSet alloc] init];
NSArray<NSString *> *testFiles = [self testFiles];
for(NSString *file in testFiles) {
NSData *data = [NSData dataWithContentsOfGZippedFile:file];
NSArray<NSDictionary *> *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