public void ReadInt64_M322234534333() { var reader = new BinaryStreamReader(new MemoryStream(BitConverter.GetBytes(-322234534333L)), new byte[20]); long value = reader.ReadInt64(); Assert.AreEqual(-322234534333L, value); }
public void ShortStream_ReadByte_ExtendStream_SeekReadInt64() { var stream = new MemoryStream(); stream.SetLength(7); stream.Position = 6; stream.WriteByte(108); stream.Position = 0; var reader = new BinaryStreamReader(stream, new byte[8]); reader.ReadByte(); stream.SetLength(34); reader.Position = 6; long value = reader.ReadInt64(); Assert.AreEqual(108, value); }