mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-09 02:31:22 +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:
parent
53d8322b46
commit
28027385bc
@ -80,13 +80,17 @@ constexpr char TestSuiteHome[] = "/Users/tharte/Projects/ProcessorTests/8088/v1"
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)testDecoding {
|
- (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];
|
NSData *data = [NSData dataWithContentsOfGZippedFile:file];
|
||||||
NSArray<NSDictionary *> *testsInFile = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
|
NSArray<NSDictionary *> *testsInFile = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
|
||||||
NSUInteger successes = 0;
|
NSUInteger successes = 0;
|
||||||
for(NSDictionary *test in testsInFile) {
|
for(NSDictionary *test in testsInFile) {
|
||||||
// A single failure per instruction is fine.
|
// A single failure per instruction is fine.
|
||||||
if(![self applyDecodingTest:test]) {
|
if(![self applyDecodingTest:test]) {
|
||||||
|
[failures addObject:file];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
++successes;
|
++successes;
|
||||||
@ -95,6 +99,8 @@ constexpr char TestSuiteHome[] = "/Users/tharte/Projects/ProcessorTests/8088/v1"
|
|||||||
NSLog(@"Failed after %ld successes", successes);
|
NSLog(@"Failed after %ld successes", successes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NSLog(@"%ld failures out of %ld tests: %@", failures.count, testFiles.count, failures);
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user