コード例 #1
0
        public void Int64Test()
        {
            MsgPackWriter writer = new MsgPackWriter(Allocator.Temp);

            writer.WriteInteger(long.MinValue);
            writer.WriteInteger(long.MaxValue);
            writer.WriteInteger((long)0);

            MsgPackReader reader = new MsgPackReader(writer.ToArray(Allocator.Temp));

            Assert.That(reader.ReadInt64(), Is.EqualTo(long.MinValue));
            Assert.That(reader.ReadInt64(), Is.EqualTo(long.MaxValue));
            Assert.That(reader.ReadInt64(), Is.EqualTo(0));
        }