public void ReverseLE_OnLESystem_DoesNothing() { EndianUtility.Endianness = Endianness.LittleEndian; var byteArray = new byte[] { 0, 1, 2, 3 }; var result = EndianUtility.ReverseLE(byteArray); Assert.Equal(byteArray, result); }
public void ReverseLE_OnBESystem_ReversesBytes() { EndianUtility.Endianness = Endianness.BigEndian; var byteArray = new byte[] { 0, 1, 2, 3 }; var reversedArray = new byte[] { 3, 2, 1, 0 }; var result = EndianUtility.ReverseLE(byteArray); Assert.Equal(reversedArray, result); }