public virtual void TestReadLongPosition() { var readLong = _input.ReadLong(2); var longB = BytesExtensions.ReadLong(InitData, 2, Endianness.BigEndian); Assert.AreEqual(longB, readLong); }
public virtual void TestReadDoublePosition() { var readDouble = _input.ReadDouble(2); var longB = BytesExtensions.ReadLong(InitData, 2, Endianness.BigEndian); var aDouble = BitConverter.Int64BitsToDouble(longB); Assert.AreEqual(aDouble, readDouble, 0); }
public virtual void TestWriteLongV() { long expected = 100; _output.Write(expected); var actual = BytesExtensions.ReadLong(_output.Buffer, 0, Endianness.BigEndian); Assert.AreEqual(actual, expected); }
public virtual void TestWriteDoubleForPositionV() { var v = 1.1d; _output.Write(1, v); var theLong = BitConverter.DoubleToInt64Bits(v); var readLongB = BytesExtensions.ReadLong(_output.Buffer, 1, Endianness.BigEndian); Assert.AreEqual(theLong, readLongB); }