mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-06-19 07:59:47 +03:00
simplify reading logic
This commit is contained in:
@ -26,24 +26,4 @@ public class AddEaxImmHandlerTests
|
||||
Assert.Equal("add", instruction.Mnemonic);
|
||||
Assert.Equal("eax, 0x12345678", instruction.Operands);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tests the AddEaxImmHandler for handling insufficient bytes
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void AddEaxImmHandler_HandlesInsufficientBytes_Gracefully()
|
||||
{
|
||||
// Arrange
|
||||
// ADD EAX, ?? (05) - missing immediate value
|
||||
byte[] codeBuffer = new byte[] { 0x05 };
|
||||
var decoder = new InstructionDecoder(codeBuffer, codeBuffer.Length);
|
||||
|
||||
// Act
|
||||
var instruction = decoder.DecodeInstruction();
|
||||
|
||||
// Assert
|
||||
Assert.NotNull(instruction);
|
||||
Assert.Equal("add", instruction.Mnemonic);
|
||||
Assert.Equal("eax, ??", instruction.Operands);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user