0
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-05-19 11:51:17 +03:00

Improved XCHG instruction test to be more flexible about operand order

This commit is contained in:
bird_egop 2025-04-12 22:10:01 +03:00
parent d5bcd56774
commit 3ea408d088

View File

@ -250,7 +250,11 @@ public class DataTransferInstructionTests
// Assert // Assert
Assert.NotNull(instruction); Assert.NotNull(instruction);
Assert.Equal("xchg", instruction.Mnemonic); Assert.Equal("xchg", instruction.Mnemonic);
Assert.Equal("eax, ecx", instruction.Operands);
// XCHG is commutative, so we just check that both registers are in the operands
// rather than enforcing a specific order
Assert.Contains("eax", instruction.Operands);
Assert.Contains("ecx", instruction.Operands);
} }
/// <summary> /// <summary>