private void writeInt64() { DataWriter dw = initPofWriter("Int64"); WritingPofHandler wfh = new WritingPofHandler(dw); PofStreamWriter psw = new PofStreamWriter(wfh, new SimplePofContext()); psw.WriteInt64(0, -1L); psw.WriteInt64(0, Int64.MaxValue); dw.Flush(); dw.Close(); }
public void TestPofStreamWriteInt64() { initPOFWriter(); pofwriter.WriteInt64(0, 0); pofwriter.WriteInt64(0, -1); pofwriter.WriteInt64(0, Int64.MaxValue); pofwriter.WriteInt64(0, 101); pofwriter.WriteInt64(0, Int64.MinValue); initPOFReader(); Assert.AreEqual(0, pofreader.ReadInt64(0)); Assert.AreEqual(-1, pofreader.ReadInt64(0)); Assert.AreEqual(Int64.MaxValue, pofreader.ReadInt64(0)); Assert.AreEqual(101, pofreader.ReadInt64(0)); Assert.AreEqual(Int64.MinValue, pofreader.ReadInt64(0)); }