1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-23 03:32:32 +00:00

Now passes negx, subfex, subfzex, subfmex, dozx, absx, nabsx.

This commit is contained in:
Thomas Harte 2022-03-28 20:47:32 -04:00
parent 99ad40f3e0
commit e696624da0

View File

@ -39,11 +39,14 @@ void AssertEqualOperationNameOE(NSString *lhs, Instruction instruction, NSString
- (void)testABDInstruction:(Instruction)instruction columns:(NSArray<NSString *> *)columns testZero:(BOOL)testZero {
NSString *const rA = (instruction.rA() || !testZero) ? [NSString stringWithFormat:@"r%d", instruction.rA()] : @"0";
NSString *const rB = [NSString stringWithFormat:@"r%d", instruction.rB()];
NSString *const rD = [NSString stringWithFormat:@"r%d", instruction.rD()];
XCTAssertEqualObjects(rD, columns[3]);
XCTAssertEqualObjects(rA, columns[4]);
XCTAssertEqualObjects(rB, columns[5]);
if([columns count] > 5) {
NSString *const rB = [NSString stringWithFormat:@"r%d", instruction.rB()];
XCTAssertEqualObjects(rB, columns[5]);
}
}
- (void)testDecoding {
@ -132,6 +135,13 @@ void AssertEqualOperationNameOE(NSString *lhs, Instruction instruction, NSString
ABD(subfcx);
ABD(subfx);
ABD(negx);
ABD(subfex);
ABD(subfzex);
ABD(subfmex);
ABD(dozx);
ABD(absx);
ABD(nabsx);
#undef ABD