0
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-06-19 16:08:02 +03:00
This commit is contained in:
bird_egop
2025-04-17 22:54:19 +03:00
parent 4d2db05a07
commit df453b930f
14 changed files with 340 additions and 192 deletions

View File

@ -24,7 +24,7 @@ public class Int3InstructionTests
// Assert
Assert.NotNull(instruction);
Assert.Equal(InstructionType.Int, instruction.Type);
Assert.Equal(InstructionType.Int3, instruction.Type);
// Check that we have no operands
Assert.Empty(instruction.StructuredOperands);

View File

@ -154,9 +154,9 @@ public class StringInstructionHandlerTests
// Check the second operand (AL)
var alOperand = instruction.StructuredOperands[1];
Assert.IsType<RegisterOperand>(alOperand);
var registerOperand = (RegisterOperand)alOperand;
Assert.Equal(RegisterIndex.A, registerOperand.Register);
Assert.IsType<Register8Operand>(alOperand);
var registerOperand = (Register8Operand)alOperand;
Assert.Equal(RegisterIndex8.AL, registerOperand.Register);
Assert.Equal(8, registerOperand.Size); // Validate that it's an 8-bit register (AL)
}
@ -223,9 +223,9 @@ public class StringInstructionHandlerTests
// Check the first operand (AL)
var alOperand = instruction.StructuredOperands[0];
Assert.IsType<RegisterOperand>(alOperand);
var registerOperand = (RegisterOperand)alOperand;
Assert.Equal(RegisterIndex.A, registerOperand.Register);
Assert.IsType<Register8Operand>(alOperand);
var registerOperand = (Register8Operand)alOperand;
Assert.Equal(RegisterIndex8.AL, registerOperand.Register);
Assert.Equal(8, registerOperand.Size); // Validate that it's an 8-bit register (AL)
// Check the second operand (memory operand)