public void GetBytesUsesCorrectEndianess() { var expected = new byte[] { 0, 0, 0, 0x1 }; var result = HmBitConverter.GetBytes(0x1); result.ShouldBe(expected); }
public void TestDoubleConversion(double input) { var bytesVersion = HmBitConverter.GetBytes(input); var floatVersion = HmBitConverter.ToDouble(bytesVersion); floatVersion.ShouldBe(input); }