Be.IO
Be.IO copied to clipboard
Fix ReadInt64 issue
There was a mistake when reading a 8 bytes value. Can be tested with following code:
[TestMethod]
public void TestUInt64()
{
using (MemoryStream ms = new MemoryStream())
{
ulong src = 1;
var bw = new BeBinaryWriter(ms);
bw.Write(src);
bw.Flush();
ms.Seek(0, SeekOrigin.Begin);
var br = new BeBinaryReader(ms);
var dst = br.ReadUInt64();
Assert.AreEqual(src, dst); //Expect 1, Actual 4294967296
}
}
By the way, I haven't figure out how to create a UnitTest project for this lib --- VS refused to add this lib as a reference when creating a VSUnitTest project. (Maybe DNX project is not supported?)
Oh, and I think maybe you should fix the Readme.md :
writer.WriteInt16(0x1357);
writer.WriteInt32(0xDEADBEEF);
writer.WriteInt64(long.MinValue); //tricky, since it's always right when test
There are no methods like these, after all :joy: