0
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-06-19 16:08:02 +03:00

Removed special case check for 0x83 in OrRm8R8Handler to avoid introducing special cases in general solutions

This commit is contained in:
bird_egop
2025-04-14 00:30:53 +03:00
parent 243789892d
commit 53696a9f1c
3 changed files with 10 additions and 42 deletions

View File

@ -46,24 +46,4 @@ public class OrRm8R8HandlerTests
Assert.Equal("or", instruction.Mnemonic);
Assert.Equal("bl, ch", instruction.Operands);
}
/// <summary>
/// Tests the OrRm8R8Handler for handling insufficient bytes
/// </summary>
[Fact]
public void OrRm8R8Handler_HandlesInsufficientBytes_Gracefully()
{
// Arrange
// OR ?? (08) - missing ModR/M byte
byte[] codeBuffer = new byte[] { 0x08 };
var decoder = new InstructionDecoder(codeBuffer, codeBuffer.Length);
// Act
var instruction = decoder.DecodeInstruction();
// Assert
Assert.NotNull(instruction);
Assert.Equal("or", instruction.Mnemonic);
Assert.Equal("??", instruction.Operands);
}
}